home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacTech 1 to 12
/
MacTech-vol-1-12.toast
/
Reference
/
the cmsp digests ('94-'97)
/
csmp digest Vol 4 No 016
< prev
next >
Wrap
Text File
|
1996-10-29
|
121KB
|
3,740 lines
C.S.M.P. Digest Mon, 28 Oct 96 Volume 4 : Issue 16
Today's Topics:
Are SetDialogDefaultItem, etc. supported?
Code snippet to find edge of main monitor?
Directory Names?
Extension woes...
Getting-Setting sound volume
Info on library formats?
Looking for TrueType to Polygon Font Conversion library
Mac-hosted UNIX?
Math64Lib for 68K
Menu Bar Height in THINK Pascal
No. of Colours in PICT
Other application's low-memory globals
Possible idea: extension for Be progs
Reading and Writing Str#
SPBSetDeviceInfo Question
Symantec Project Managers
Think Pascal: where is HasDepth declared ??
Transparant blitter.
Trap Patching...
Video Ram
Word Processing DLL for Macintosh
[BETA] fast memory allocator and debugging tool
[Q] C++ static initialization in 68K code resource?
[Q] telephone wire used by Phonnet
beg game program-animation
where can I find macsbug?
The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
(marka@ee.mcgill.ca).
The digest is a collection of article threads from the internet
newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
csmp.games. It is designed for people who read news semi-regularly and
want an archive of the discussions. If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you
may still be able to post messages to the group by using a mail server
like anon.penet.fi (mail help@anon.penet.fi for more information).
Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject. The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
ee.mcgill.ca). Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest). Article threads that
consist of only one message are generally not included in the digest.
The digests can be obtained by email, ftp or through the World Wide Web.
If you want to receive the digest by mail, send email to
majordomo@ee.mcgill.ca with no subject and one of the following commands
as body:
help Sends you a summary of commands
subscribe csmp Adds you to the mailing list
unsubscribe csmp Removes you from the list
Once you have subscribed, you will automatically receive each new
issue as it is created.
Back issues are available by ftp from Info-Mac mirror sites in the
per/csmp subdirectory, e.g.
ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
The contents of all back issues can be searched by accessing the
following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
http://marvin.stattech.com.au/search.html
They can also be searched through the following URLs, thanks to
Tim Tuck (Tim.Tuck@sensei.com.au):
http://wais.sensei.com.au/searchform.html
wais://wais.sensei.com.au:210/csmp?
-------------------------------------------------------
>From Jackson Software Development <development@jacksoncorp.com>
Subject: Are SetDialogDefaultItem, etc. supported?
Date: 14 Oct 1996 21:53:28 GMT
Organization: Jackson Software
I was looking through Think Ref. and I stumbled across
SetDialogDefaultItem
and SetDialogCancelItem. It says that they aren't defined in the headers,
although CodeWarrior does have them. Is it safe to use them or should
they be avoided? Just curious.
Darrin
+++++++++++++++++++++++++++
>From craig@epic.co.uk (Craig Emery)
Date: Tue, 15 Oct 1996 13:09:30 +0100
Organization: Epic Miltimedia Group
In article <53ucoo$rj8@kirin.wwa.com>, Jackson Software Development
<development@jacksoncorp.com> wrote:
>I was looking through Think Ref. and I stumbled across
>SetDialogDefaultItem
>and SetDialogCancelItem. It says that they aren't defined in the headers,
>although CodeWarrior does have them. Is it safe to use them or should
>they be avoided? Just curious.
>
>Darrin
I've used them with no problems in CW9 and CW10 with both 68k (native and
emulated) and PPC.
Craig.
-----------------------------------------------------------------------
| Norman Craig Emery B.Sc., craig@epic.co.uk |
| Team Leader / Senior CDi Programmer & CRAIG.EPIC@applelink.apple.com |
| Macintosh Programming Coordinator, Voice: +44 (0) (1273) 320637 |
| The Epic Multimedia Group, Fax: +44 (0) (1273) 821567 |
| http://www.epic.co.uk/ |
| VPS House, 52 Old Steine, Brighton, East Sussex, BN1 1NH, U.K. |
-----------------------------------------------------------------------
+++++++++++++++++++++++++++
>From blob@ricochet.net
Date: Tue, 15 Oct 1996 07:40:34 -0700
Organization: (none)
In article <53ucoo$rj8@kirin.wwa.com>, Jackson Software Development
<development@jacksoncorp.com> wrote:
> I was looking through Think Ref. and I stumbled across
> SetDialogDefaultItem
> and SetDialogCancelItem. It says that they aren't defined in the headers,
> although CodeWarrior does have them. Is it safe to use them or should
> they be avoided? Just curious.
This is another example of a bug in Think Reference. There's a technote
called Pending Update Perils where these routines were first introduced.
They have been in the headers for at least four years. Unfortunately, the
Think Reference databases, while useful, haven't been updated in a long
long time.
Use SetDialogDefaultItem and SetDialogCancelItem freely in any modern
application.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
+++++++++++++++++++++++++++
>From darth@zfn.uni-bremen.de (Jochen Lippert)
Date: Tue, 15 Oct 1996 18:14:25 +0200
Organization: University of Bremen
In article <blob-ya023180001510960740340001@news.ricochet.net>,
blob@ricochet.net wrote:
> In article <53ucoo$rj8@kirin.wwa.com>, Jackson Software Development
> <development@jacksoncorp.com> wrote:
>
> > I was looking through Think Ref. and I stumbled across
> > SetDialogDefaultItem
> > and SetDialogCancelItem. It says that they aren't defined in the headers,
> > although CodeWarrior does have them. Is it safe to use them or should
> > they be avoided? Just curious.
>
> This is another example of a bug in Think Reference. There's a technote
> called Pending Update Perils where these routines were first introduced.
> They have been in the headers for at least four years. Unfortunately, the
> Think Reference databases, while useful, haven't been updated in a long
> long time.
There is a related bug in TR. The call SetDialogTracksCursor is named
SetDialogTrackCursor in TR (note the Track*s* in comparison to the Track).
Just to avoid confusion :)
Jochen Lippert
darth@zfn.uni-bremen.de
---------------------------
>From bcland00@pop.uky.edu (Brian Landers)
Subject: Code snippet to find edge of main monitor?
Date: Fri, 27 Sep 1996 17:50:58 -0500
Organization: CampusMCI
Hi, I'm looking for a code snippet, either using PowerPlant or not, to find
the global coordinates for the upper-right corner of the main monitor. I
know how to get the desktop region using the qd global, but not to find
just the main monitor.
The reason for this is I want to be able to display a window in the
upper-right corner of the main screen by default.
Thanks in advance, and please feel free to email or post your reply.
Brian Landers
bcland00@pop.uky.edu
+++++++++++++++++++++++++++
>From carsten.kossendey@nrw-online.de (Carsten Kossendey)
Date: Sat, 28 Sep 1996 01:27:17 +0100
Organization: Nacamar Data Communications
Brian Landers <bcland00@pop.uky.edu> wrote:
> Hi, I'm looking for a code snippet, either using PowerPlant or not, to find
> the global coordinates for the upper-right corner of the main monitor. I
> know how to get the desktop region using the qd global, but not to find
> just the main monitor.
>
> The reason for this is I want to be able to display a window in the
> upper-right corner of the main screen by default.
>
> Thanks in advance, and please feel free to email or post your reply.
>
> Brian Landers
> bcland00@pop.uky.edu
here's the basic one-command approach to your problem.
(assumption here is that the main screen appears first in the device
list):
theMainScreenRect = LMGetDeviceList()->gdRect
[this is code straight from my brain, you may need to add some type
casting]
btw, the official way of doing this is to crawl all the way through the
device list until you find the one with a specific flag set, but this is
around 20 lines of code and i can't make that without looking into a
book or two.
cheers!
--
Carsten Kossendey (carsten.kossendey@nrw-online.de)
"Life is too short for the game of chess"
- Lord Henry Byron
+++++++++++++++++++++++++++
>From gregj@europa.com (Greg Jorgensen)
Date: Mon, 30 Sep 1996 21:30:15 -0800
Organization: Europa Communications, Inc, Portland Oregon USA
In article <bcland00-ya023080002709961750580001@news.campus.mci.net>,
bcland00@pop.uky.edu (Brian Landers) wrote:
>Hi, I'm looking for a code snippet, either using PowerPlant or not, to find
>the global coordinates for the upper-right corner of the main monitor. I
>know how to get the desktop region using the qd global, but not to find
>just the main monitor.
>
>The reason for this is I want to be able to display a window in the
>upper-right corner of the main screen by default.
>
>Thanks in advance, and please feel free to email or post your reply.
GDHandle maindevice = GetMainDevice();
Rect bounds = (*maindevice)->gdRect;
The resulting "bounds" will be in global coordinates.
Note that GetMainDevice() may move or purge memory.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"I tell you, we are here on Earth to fart around, and don't let anyone tell you any different." -- Kurt Vonnegut
+++++++++++++++++++++++++++
>From "Aidan Cully" <aidan@xanadu.kublai.com>
Date: 1 Oct 96 00:18:49 -0400
Organization: INTAC Access Corporation - An Internet Service Provider
>Brian Landers <bcland00@pop.uky.edu> wrote:
>
>> Hi, I'm looking for a code snippet, either using PowerPlant or not, to
>find
>> the global coordinates for the upper-right corner of the main monitor. I
>> know how to get the desktop region using the qd global, but not to find
>> just the main monitor.
>>
>> The reason for this is I want to be able to display a window in the
>> upper-right corner of the main screen by default.
>>
>> Thanks in advance, and please feel free to email or post your reply.
>>
>> Brian Landers
>> bcland00@pop.uky.edu
>
>here's the basic one-command approach to your problem.
>(assumption here is that the main screen appears first in the device
>list):
>
> theMainScreenRect = LMGetDeviceList()->gdRect
>
>[this is code straight from my brain, you may need to add some type
>casting]
>
>btw, the official way of doing this is to crawl all the way through the
>device list until you find the one with a specific flag set, but this is
>around 20 lines of code and i can't make that without looking into a
>book or two.
>
>cheers!
>
How about:
theMainScreenRect = qd.screenBits.bounds;
I think the screenBits global variable is set to universally point to the
main screen's PixMap, and the looping is basically for finding the largest
screen, or performing operations which could affect multiple screens.
+++++++++++++++++++++++++++
>From carsten.kossendey@nrw-online.de (Carsten Kossendey)
Date: Sat, 5 Oct 1996 01:19:08 +0100
Organization: Nacamar Data Communications
Aidan Cully <aidan@xanadu.kublai.com> wrote:
> >Brian Landers <bcland00@pop.uky.edu> wrote:
> >
> >> Hi, I'm looking for a code snippet, either using PowerPlant or not, to
> >find
> >> the global coordinates for the upper-right corner of the main monitor. I
> >> know how to get the desktop region using the qd global, but not to find
> >> just the main monitor.
> >>
> >> The reason for this is I want to be able to display a window in the
> >> upper-right corner of the main screen by default.
> >>
> >> Thanks in advance, and please feel free to email or post your reply.
> >>
> >> Brian Landers
> >> bcland00@pop.uky.edu
> >
> >here's the basic one-command approach to your problem.
> >(assumption here is that the main screen appears first in the device
> >list):
> >
> > theMainScreenRect = LMGetDeviceList()->gdRect
> >
> >[this is code straight from my brain, you may need to add some type
> >casting]
> >
> >btw, the official way of doing this is to crawl all the way through the
> >device list until you find the one with a specific flag set, but this is
> >around 20 lines of code and i can't make that without looking into a
> >book or two.
> >
> >cheers!
> >
>
> How about:
> theMainScreenRect = qd.screenBits.bounds;
>
> I think the screenBits global variable is set to universally point to the
> main screen's PixMap, and the looping is basically for finding the largest
> screen, or performing operations which could affect multiple screens.
qd.screenBits.bounds is the virtual (!) rect that includes ALL screens
(useful for dragging windows and stuff). the tricky part here is that
parts of that rectangle may be simply unexistant, e.g. if you have a
832x624 (17") main screen and a secondary 640x480 (14") screen right to
it, qd.screenbits.bounds will be { 0, 0, 1472, 624 } - however the area
{ 832, 480, 1472, 624 } is offscreen.
--
Carsten Kossendey (carsten.kossendey@nrw-online.de)
"Life is too short for the game of chess"
- Lord Henry Byron
+++++++++++++++++++++++++++
>From hsoi@eden.com (John C. Daub)
Date: Fri, 04 Oct 1996 20:19:24 -0500
Organization: Hsoi's Shop
In article <199610050119084827402@ckossend.nrw-online.de>,
carsten.kossendey@nrw-online.de (Carsten Kossendey) wrote:
> > theMainScreenRect = qd.screenBits.bounds;
> >
> > I think the screenBits global variable is set to universally point to the
> > main screen's PixMap, and the looping is basically for finding the largest
> > screen, or performing operations which could affect multiple screens.
>
> qd.screenBits.bounds is the virtual (!) rect that includes ALL screens
> (useful for dragging windows and stuff). the tricky part here is that
> parts of that rectangle may be simply unexistant, e.g. if you have a
> 832x624 (17") main screen and a secondary 640x480 (14") screen right to
> it, qd.screenbits.bounds will be { 0, 0, 1472, 624 } - however the area
> { 832, 480, 1472, 624 } is offscreen.
>From the Macintosh Programming FAQ <http://www.best.com/~ckt/faq/>
5.13) Q: How do I get the rect of the screen?
A: Which screen? There can be many screens. The rectangle of the main screen
is qd.screenBits.bounds. The rectangle of all the screens is
(**GetGrayRgn()).rgnBBox. You should always post the rectangle covering
all
the screens to DragWindow(). This is well-documented in Inside Mac.
(and the "This is well documented" line is a hypertext link to this URL:
http://devworld.apple.com/dev/techsupport/insidemac/QuickDraw/QuickDraw-18.html
Inside Macintosh:Devices will also be a help here to deal with monitor
real estate (and just dealing with monitors).
Since you can get Inside Macintosh for free in electronic versions
(although the lack of a QuickView database for OpenTransport is
SORELY lacking...hint hint), little excuse not to have them and not to
read them :) Enjoy!
--
John C. Daub (aka Hsoi) | Pleasure: <mailto:hsoi@eden.com>
Family Man | Business: none of your business :)
Shareware Author | WWW: <http://www.eden.com/~hsoi/>
MacOS Developer/Geek | "What lasagna? THAT lasagna" - Ajax
+++++++++++++++++++++++++++
>From Graham <graham@impro.demon.co.uk>
Date: Mon, 14 Oct 1996 23:07:50 +0100
Organization: Image Processing & Vision Co. Ltd.
Try:
GDHandle mainScreen;
Rect msRect;
mainScreen = GetMainDevice();
msRect = (*mainScreen)->gdRect;
// then get the top, right fields of the rect.
---------------------------
>From John Ulvr <jhulvr@undergrad.math.uwaterloo.ca>
Subject: Directory Names?
Date: Tue, 15 Oct 1996 10:40:44 -0300
Organization: Newbridge
How do you get a directory name from an Id?
This may seem like a stupid question, but I've been at it for over a day
now, and am getting a bit frustrated. I have a dialog box, which allows
me to select a file I want to create (called from StandardPutFile() in
pascal). It returns a file name, a parentId and vRefNum. Now, I need
to get the FULL name of the file (including directory and volume name).
Does anyone know how to do this?
Could you please email any replies to
jhulvr@undergrad.math.uwaterloo.ca, I don't check this newsgroup often.
Thanks,
John
+++++++++++++++++++++++++++
>From David Scott <dscott@west.net>
Date: Tue, 15 Oct 1996 18:02:44 +0000
Organization: West.Net Communications
John Ulvr wrote:
>
> How do you get a directory name from an Id?
>
> This may seem like a stupid question, but I've been at it for over a
> day now, and am getting a bit frustrated. I have a dialog box, which
> allows me to select a file I want to create (called from
> StandardPutFile() in pascal). It returns a file name, a parentId and
> vRefNum. Now, I need to get the FULL name of the file (including
> directory and volume name).
> Does anyone know how to do this?
>
I don't know if you are looking for the code in pascal but here is
something in C.
I'm still green so if this code is off the mark I'm prepared to hear
about it. :)
- -----------------------------
char *GetPathName( short vRefNum, long directoryID, char *pathName )
{
OSErr error;
Str255 name;
CInfoPBRec pb;
*pathName = 0;
pb.dirInfo.ioNamePtr = name;
pb.dirInfo.ioDrParID = directoryID;
do
{
pb.dirInfo.ioVRefNum = vRefNum;
pb.dirInfo.ioFDirIndex = -1;
pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;
error = PBGetCatInfoSync( &pb );
pStrcat( name, "/p:" );
pStrcat( name, pathName );
pStrcpy( pathName, name );
}while( pb.dirInfo.ioDrDirID != fsRtDirID ); /* till the root dir */
return( pathName );
}
--
David Scott http://www.west.net/~dscott
Santa Barbara
---------------------------
>From lottsim@aol.com (LOTTSIM)
Subject: Extension woes...
Date: 14 Oct 1996 18:41:18 -0400
Organization: America Online, Inc. (1-800-827-6364)
I'm finishing another extension/control panel, yet can't seem to get a
certain part of it to work.
I want to be able to open files and control panels, and the obvious
solution is Apple Events. But, one mustn't send apple events from an
INIT, or...
This just hit me. If the current application is Apple-Event aware, then I
should be able to send apple events from my INIT. So, for example, if I
make the finder the front process, then attempt to send an 'odoc' (or
whatever) apple event, all should work. Although, the finder is sending
and receiving...is this bad?
*OR*, I could write a little code segment, defined as such:
void main(FSSpec mySpec);
I've seen some sample FKEY code that goes into its own WNE/GNE loop, so if
I already have that going, can't I send an Apple Event then?
This is a simple problem, but I want to do it the proper way (if there is
one?)
Thanks!
Regards,
Alex Rampell
+++++++++++++++++++++++++++
>From parichan@best.com (Kevin Parichan)
Date: Mon, 14 Oct 1996 16:22:33 -0800
Organization: Best Internet Communications
In article <53ufie$m9q@newsbf02.news.aol.com>, lottsim@aol.com (LOTTSIM) wrote:
>I'm finishing another extension/control panel, yet can't seem to get a
>certain part of it to work.
>
>I want to be able to open files and control panels, and the obvious
>solution is Apple Events. But, one mustn't send apple events from an
>INIT, or...
Not sure where you read this or what problems you're having, but an INIT
_can_ send AppleEvents, just not receive them because they don't have
event loop.
-Kevin Parichan
+++++++++++++++++++++++++++
>From "Eric Stadtherr" <ericstad@netcom.com>
Date: 15 Oct 96 18:10:14 -0600
Organization: Dimensional Communications
>>I'm finishing another extension/control panel, yet can't seem to get a
>>certain part of it to work.
>>
>>I want to be able to open files and control panels, and the obvious
>>solution is Apple Events. But, one mustn't send apple events from an
>>INIT, or...
>
>Not sure where you read this or what problems you're having, but an INIT
>_can_ send AppleEvents, just not receive them because they don't have
>event loop.
>
>
I have tried this from an INIT before with unfriendly results. The way I
sent events from an INIT to an application is through the (obsolete?)
PostHighLevelEvent() call. Otherwise I believe the apple events are
created in the application heap, which may or may not be valid from within
the context of the INIT.
If you need to send apple events, create a BOA that receives your custom
high level events and sends AppleEvents based on the data in the high level
events. Effectively, instead of:
INIT --AppleEvent--> target Application
you will have:
INIT --HighLevelEvent--> Your BOA --AppleEvent--> target Application
You may be able to do some fancy SetZone() calls to get the apple events
into the system heap from the INIT, but I couldn't ever get it to work.
I hope this helps!
Eric Stadtherr
SingleTrac Software
+++++++++++++++++++++++++++
>From jwwalker@kagi.com (James W. Walker)
Date: Tue, 15 Oct 1996 23:37:09 -0700
Organization: Nisus Software, Inc.
In article <53ufie$m9q@newsbf02.news.aol.com>, lottsim@aol.com (LOTTSIM) wrote:
>This just hit me. If the current application is Apple-Event aware, then I
>should be able to send apple events from my INIT. So, for example, if I
>make the finder the front process, then attempt to send an 'odoc' (or
>whatever) apple event, all should work. Although, the finder is sending
>and receiving...is this bad?
I think that should work. However, it may depend on what your INIT does.
If you've patched jGNEFilter, say, it would probably be OK to send an
AppleEvent from the patch. On the other hand, if you have patched a trap
that runs at interrupt time or is guaranteed not to move memory, you'd
better not try to send AppleEvents from the patch.
>*OR*, I could write a little code segment, defined as such:
>void main(FSSpec mySpec);
>
>I've seen some sample FKEY code that goes into its own WNE/GNE loop, so if
>I already have that going, can't I send an Apple Event then?
Having an event loop doesn't make it an application. An FKEY still lives
as a "parasite" on some application's context.
--
-- Jim Walker <http://members.aol.com/jwwalker/>
---------------------------
>From heaney@crl.com (John S. Heaney)
Subject: Getting-Setting sound volume
Date: 15 Oct 1996 11:57:03 -0700
Organization: CRL Dialup Internet Access (415) 705-6060 [Login: guest]
I'm trying to implement a menu for setting the sound volume in my
application. Sound Manager 3.0 introduces the SetDefaultOutputVolume and
GetDefaultOutputVolume calls. This seems like exactly what I want, but
I'm noticing two things that I need help with.
1)
Setting the volume to 0 does not turn the sound off. Inside Mac gave me
the impression that the sound would would be all the way off. The
constant for this value is called kNoVolume.
2)
The volume setting seems to be quantized to 7 steps, 8 including 0. No
volume is 0 and full volume is 256. If I set the volume to 32 and then
get the volume, it is set to 0. If I set it to 40 then it gets set to 37.
So, it seems there are 7 fixed possible values for the volume setting.
Some possibly relevant info, I'm using a IIcx with System 7.1 and Sound
Manager 3.0. I have not experimented with other systems yet. I'm using
the same value for both the left and right channels, which are in the hi
and lo words of the volume parameter.
BTW, I was attempting to provide command keys for 1-9 with 1 being
silence and then 8 levels of volume. Unless someone can tell me
differently, it looks like I'll have to settle for 1-8 without any silent
level.
--
John Heaney Time flies whether you're having fun or not.
heaney@crl.com
+++++++++++++++++++++++++++
>From franke1@llnl.gov (Norman Franke)
Date: Tue, 15 Oct 1996 15:06:30 -0700
Organization: Lawrence Livermore National Laboratory
In article <540mpv$b7f@crl3.crl.com>, heaney@crl.com (John S. Heaney) wrote:
> I'm trying to implement a menu for setting the sound volume in my
> application. Sound Manager 3.0 introduces the SetDefaultOutputVolume and
> GetDefaultOutputVolume calls. This seems like exactly what I want, but
> I'm noticing two things that I need help with.
I did this in SoundApp 2.1.1, however I've since dropped the idea.
> Setting the volume to 0 does not turn the sound off. Inside Mac gave me
> the impression that the sound would would be all the way off. The
> constant for this value is called kNoVolume.
On some Macs, e.g. my old Mac II, it does. On others, e.g. a Power Mac
8500, it doesn't. I think the kNoVolume was meant for the system alert
sound, which flashes the menu bar instead.
> The volume setting seems to be quantized to 7 steps, 8 including 0. No
> volume is 0 and full volume is 256. If I set the volume to 32 and then
> get the volume, it is set to 0. If I set it to 40 then it gets set to 37.
> So, it seems there are 7 fixed possible values for the volume setting.
Indeed, this is quite annoying. Basically, it takes the "floor" of the
value on those systems which only support the old 0-7 sound volume. Thus,
you need to find out what the value of "1" would be, and use that instead,
and so on for the other values. Basically, use: n * 256 / 7 and round UP
always, (27, 74, etc.)
One Power Macs, you shouldn't do this as they support the fill 0-256. I set
the volume to 32 and then read it. If it came out zero, I did the 0-7 and
otherwise did 0-10.
However, this all fails on PPC Performas. Changing the volume this way
causes them to make clicking sounds continuously. I couldn't figure it out,
so I've since used the volumeCmd on my sound channel which always works.
This also allows you to over drive the volume. I support up to 150% for
those who like to live on the edge.
--
Norman Franke
franke1@llnl.gov
---------------------------
>From Jonas Nordin <jonasno@student.csd.uu.se>
Subject: Info on library formats?
Date: Tue, 15 Oct 1996 21:43:09 +0200
Organization: Computing Science Dep., University of Uppsala, Sweden.
Does anyone know where to get information regarding
the internal format of a MacOS code library?
(Inside Macintosh: PowerPC System Software only covers
routines to get information about symbols in a code fragment;
it has nothing on the format of the code itself.)
/ Jonas
- --------------------------------------
Jonas Nordin
jonasno@minsk.docs.uu.se
+++++++++++++++++++++++++++
>From trumbull@cs.yale.edu (Ben Trumbull)
Date: Tue, 15 Oct 1996 18:29:56 -0400
Organization: Yale University
In article <3263E94D.4ABA@student.csd.uu.se>, Jonas Nordin
<jonasno@student.csd.uu.se> wrote:
> Does anyone know where to get information regarding
> the internal format of a MacOS code library?
>
> (Inside Macintosh: PowerPC System Software only covers
> routines to get information about symbols in a code fragment;
> it has nothing on the format of the code itself.)
All (more or less) the PPC libraries, applications, and executable
binaries are in the same format, PEF. (N.B. some older ones are in XCOFF,
an AIX format). I believe that the CFM 68K libraries are in the same
format, but I don't know much about the 68K issues.
There is available via "downloadable license" (or whatever term these
lawyers have fabricated) the PEF specification from Apple. This isn't
going to be very helpful unless you're trying to write a compiler or
similar (link editor, debugger, etc) utility.
I don't know about its legality for exportation. Check :
<http://devworld.apple.com/mkt/registering/swl/agreements.html>
terminally curious,
Ben
___________________________________________________________________
Benjamin Trumbull
trumbull@cs.yale.edu
Yale University
You can't be in hell; you can still read your e-mail
---------------------------
>From Randy Frank <rfrank@rsinc.com>
Subject: Looking for TrueType to Polygon Font Conversion library
Date: Mon, 14 Oct 1996 18:30:31 -0600
Organization: Research Systems Inc.
Hello,
I am looking for a library (PD or commercial) which will allow me to
extract the outlines of a TrueType font in a polygon vertex format. I
need to create polygon text in a 3D application and need to be able to
use the fonts installed on the Mac. Note: the application must be able
to run on a 68k Mac, so it will not use QuickDraw 3D. I would prefer a
solution which did not use QuickDraw GX, but I will consider any such
libraries I can find. If you know of anything which might fit the bill,
please let me know.
Thanks in advance.
--
rjf.
Randy Frank, Software Engineer | (303) 786-9900
Research Systems Inc. | 2995 Wilderness Place
rfrank@rsinc.com | Boulder, CO 80301
+++++++++++++++++++++++++++
>From bpettit@aimnet.com (Brad Pettit)
Date: Tue, 15 Oct 1996 16:03:58 -0700
Organization: Apple Computer
On some of the developer cd's, there is a snippet called "QD Curves" (or
something like that) that contains C code that does what you request. It
will take a bit of effort to extract what you need, but most of the work
is done for you.
--Brad
p.s. if you find another source, please let me know, too.
- ---
In article <3262DB27.116F@rsinc.com>, Randy Frank <rfrank@rsinc.com> wrote:
> Hello,
> I am looking for a library (PD or commercial) which will allow me to
> extract the outlines of a TrueType font in a polygon vertex format. I
> need to create polygon text in a 3D application and need to be able to
> use the fonts installed on the Mac.
>
> Thanks in advance.
>
> --
>
> rjf.
> Randy Frank, Software Engineer | (303) 786-9900
> Research Systems Inc. | 2995 Wilderness Place
> rfrank@rsinc.com | Boulder, CO 80301
---------------------------
>From dtisdall@mv.igs.net (Dylan Tisdall)
Subject: Mac-hosted UNIX?
Date: Mon, 07 Oct 1996 16:55:32 -0400
Organization: IGS - Information Gateway Services
Hi,
Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
write CGI apps, but I don't really want to bother learning another
language (i.e. Perl).
Sorry if this isn't the right place to ask this.
TTFN!
Dylan
+++++++++++++++++++++++++++
>From jude@smellycat.com (Jude Giampaolo)
Date: 8 Oct 1996 05:02:32 GMT
Organization: CyberDrugs
In article <dtisdall-0710961655330001@ttya0b.mv.igs.net>,
dtisdall@mv.igs.net (Dylan Tisdall) wrote:
> Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
> write CGI apps, but I don't really want to bother learning another
> language (i.e. Perl).
You can write C programs in UNIX too. You don't have to learn perl. I do
recommend it tho....
--
Jude Charles Giampaolo 'I was lined up for glory, but the
jcg161@psu.edu tickets sold out in advance' -Rush
jude@smellycat.com http://prozac.cwru.edu/jude/JudeHome.html
+++++++++++++++++++++++++++
>From bierman@apple.com (Peter Bierman)
Date: Wed, 09 Oct 1996 16:22:50 -0800
Organization: I do not speak for Apple Computer!
In article <jude-0810960111240001@jcg161.rh.psu.edu>, jude@smellycat.com
(Jude Giampaolo) wrote:
> In article <dtisdall-0710961655330001@ttya0b.mv.igs.net>,
> dtisdall@mv.igs.net (Dylan Tisdall) wrote:
>
> > Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
> > write CGI apps, but I don't really want to bother learning another
> > language (i.e. Perl).
>
> You can write C programs in UNIX too. You don't have to learn perl. I do
> recommend it tho....
I think he means he wants a Mac C Compiler that produces a UNIX binary.
The problem with that is that there are SO many UNIX binary flavors. I
don't know of any Mac compilers that currently output UNIX binaries. It
shouldn't be too hard to move an ANSI project over to GCC on the actual
target machine though. That's how I usually do my UNIX projects. (Death to
vi).
-pmb
--
lunatic@cs.wisc.edu <A HREF="http://dax.cs.wisc.edu/~lunatic/">me</a>
Q: Am I unique and special in the universe?
A: There are over 10,000 major university and corporate sites running
exact duplicates of you in the present release version.
+++++++++++++++++++++++++++
>From bill@scconsult.com (Bill Stewart-Cole)
Date: Thu, 10 Oct 1996 00:39:48 -0500
Organization: ZOG
In article <dtisdall-0710961655330001@ttya0b.mv.igs.net>,
dtisdall@mv.igs.net (Dylan Tisdall) wrote:
>Hi,
>
>Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
>write CGI apps, but I don't really want to bother learning another
>language (i.e. Perl).
There's a fundamental problem here.
"Unix" is usually used loosely[1] to refer to a broad class of OS's running
on dozens of different architectures. Which Unix do you mean? On what
processor? Using what executable format?
I believe that no matter the answers to those questions, the answer to your
question is simply: NO. The reason for this is that "Unix" is not a single
OS and does not run on a single type of processor. This is why much of the
common Unix software is chiefly distributed as source code, because the
variations between Unix machines are so great.
FWIW, it is perfectly possible to code CGI's in C on Unix. It is done all
the time. Unix has very good C tools.
[1] Technically, Unix is a trademark. It was owned by AT&T, sold to Novell,
and I believe Novell has since sold or sublicensed it to SCO or OSF or some
such bunch. There are somthing like 4 OS's that can legally be called Unix,
and even they run on a variety of platforms.
--
Bill Stewart-Cole
+++++++++++++++++++++++++++
>From Steven Carlson <stevec@accessone.com>
Date: Sat, 12 Oct 1996 18:41:10 -0700
Organization: AccessOne
On Mon, 7 Oct 1996, Dylan Tisdall wrote:
> Hi,
>
> Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
> write CGI apps, but I don't really want to bother learning another
> language (i.e. Perl).
>
> Sorry if this isn't the right place to ask this.
>
> TTFN!
> Dylan
>
>
There isn't one to my knowledge. One of the obvious reasons is that it
would need to generate binaries for different platforms. If you have
shell access to the machine your CGIs would run on, check out the gcc or
cc man pages. Gcc is an ansi compiler compiler so you could compose with
BBEdit or CW and upload to compile.
Perl is a pretty simple scripting language. If you know C you could pick
the Perl basics in less than an hour.
--
Steven Carlson
stevec@accessone.com
+++++++++++++++++++++++++++
>From ma@maths.uwa.edu.au (ma)
Date: Tue, 15 Oct 1996 16:18:57 +0800
Organization: The University of Western Australia
In article <dtisdall-0710961655330001@ttya0b.mv.igs.net>,
dtisdall@mv.igs.net (Dylan Tisdall) wrote:
> Hi,
>
> Does anyone know a Mac-hosted C compiler for UNIX systems? I'm hoping to
> write CGI apps, but I don't really want to bother learning another
> language (i.e. Perl).
>
> Sorry if this isn't the right place to ask this.
>
> TTFN!
> Dylan
================
All examples available to me use some tools like
"www.h", "cgi.h", "html.h", etc.
These are NOT available to me and I do not know where to find them. Can
somebody give me a pointer?
As an outsider and only an occasional user, I do not know how the server
passes the environment variables the cgi.c-script. All examples I have use
the function: something like
getenv("content_length");
Is there any source code of PERL-interpreter written in C that is
available to the public? Be grateful if somebody can give me a pointer.
ResponderBuilder is supposed to serve the purpose but it relies on the
Coder-Warrior-plateform. Is there any one who successfully modified it to
Think-C-v5?
Occasionally, I downloaded some files with extention .tar.z. Stuffit
refused to un-compress them. Mac-system recommended ZipIt but my
Department does not have it. Is it a freeware? Where can I get a copy?
I wish to thank Nick.c who drew my attention to this newsgroup. Please
accept my apology if my questions have been documented in FAQ of your
group. Thanks in advance.
======================
This reflects myself alone.
ma@maths.uwa.edu.au
======================
---------------------------
>From stack <stack@teleport.com>
Subject: Math64Lib for 68K
Date: Fri, 11 Oct 1996 12:36:45 -0700
Organization: StoneTablet Publishing
For PPC, there is a Math64Lib which performs 64 bit integer
math (eg. S64Divide). Is there something like that for 68K?
The Math64.h has all the S64 functions bracketed with
#if GENERATINGPOWERPC. Has anyone implemented a 68K equivalent
that they would be willing to share?
Thanks
Bill
+++++++++++++++++++++++++++
>From jude@smellycat.com (Jude Giampaolo)
Date: Fri, 11 Oct 1996 16:17:57 -0500
Organization: CyberDrugs
In article <325EA1CC.24A4@teleport.com>, stack@teleport.com wrote:
> For PPC, there is a Math64Lib which performs 64 bit integer
> math (eg. S64Divide). Is there something like that for 68K?
There was a Develop artice on this a while back I think. I'm sorry I don't
remeber which issue.
--
Jude Charles Giampaolo 'I was lined up for glory, but the
jcg161@psu.edu tickets sold out in advance' -Rush
jude@smellycat.com http://prozac.cwru.edu/jude/JudeHome.html
+++++++++++++++++++++++++++
>From craig@epic.co.uk (Craig Emery)
Date: Tue, 15 Oct 1996 13:01:40 +0100
Organization: Epic Miltimedia Group
In article <jude-1110961617570001@jcg161.rh.psu.edu>, jude@smellycat.com
(Jude Giampaolo) wrote:
>There was a Develop artice on this a while back I think. I'm sorry I don't
remeber which issue.
Develop 26, June 1996.
Craig.
-----------------------------------------------------------------------
| Norman Craig Emery B.Sc., craig@epic.co.uk |
| Team Leader / Senior CDi Programmer & CRAIG.EPIC@applelink.apple.com |
| Macintosh Programming Coordinator, Voice: +44 (0) (1273) 320637 |
| The Epic Multimedia Group, Fax: +44 (0) (1273) 821567 |
| http://www.epic.co.uk/ |
| VPS House, 52 Old Steine, Brighton, East Sussex, BN1 1NH, U.K. |
-----------------------------------------------------------------------
---------------------------
>From Adrian Umpleby <adrian@ic.ac.uk>
Subject: Menu Bar Height in THINK Pascal
Date: Mon, 14 Oct 1996 12:53:20 +0100
Organization: Imperial College of Science, Technology and Medicine
Hi all,
Quick question about THINK Pascal (v4)...
How do you Get/Set the menu bar height in THINK Pascal?
The function GetMenuBarHeight (or GetMBarHeight) is not
recognised, as well as the global variable MBarHeight.
Do I need to add some obscure library or interface file
into the project? I would have expected these to be part
of menu.p (which is, of course, supposed to be built in).
Thanks for any info!
======================================
Adrian Umpleby
adrian@ic.ac.uk
http://wrench.et.ic.ac.uk/adrian/
======================================
+++++++++++++++++++++++++++
>From davea@atlas.co.uk (Dave)
Date: Mon, 14 Oct 1996 16:01:38 +0000
Organization: Atlas Internet
This is taken from the header file Menus.h:
extern pascal short GetMBarHeight( void )
TWOWORDINLINE( 0x3EB8, 0x0BAA ); /* MOVE.w $0BAA,(SP) */
Heres my code example of how to hide and show the menu bar, it may not be
the best example available, but it works for me.
Dave
short oldMBarHeight;
RgnHandle mBarRgn,GrayRgn;
short MBarHeight;
void HideMenuBar()
{
Rect mBarRect;
oldMBarHeight = GetMBarHeight();
GrayRgn = GetGrayRgn();
MBarHeight = 0; /* make the Menu Bar's height zero */
SetRect(&mBarRect,qd.screenBits.bounds.left, qd.screenBits.bounds.top,
qd.screenBits.bounds.right, qd.screenBits.bounds.top + oldMBarHeight);
mBarRgn = NewRgn();
RectRgn(mBarRgn, &mBarRect);
UnionRgn(GrayRgn, mBarRgn, GrayRgn);/* tell the desktop it covers the menu
* bar
*/
PaintOne(nil, mBarRgn); /* redraw desktop */
}
void ShowMenuBar()
{
MBarHeight = oldMBarHeight; /* make the menu bar's height normal */
DiffRgn(GrayRgn, mBarRgn, GrayRgn); /* remove the menu bar from the
* desktop
*/
DisposeRgn(mBarRgn);
}
In article <326229B0.41C6@ic.ac.uk>, Adrian Umpleby <adrian@ic.ac.uk> wrote:
> Hi all,
>
> Quick question about THINK Pascal (v4)...
>
> How do you Get/Set the menu bar height in THINK Pascal?
> The function GetMenuBarHeight (or GetMBarHeight) is not
> recognised, as well as the global variable MBarHeight.
>
> Do I need to add some obscure library or interface file
> into the project? I would have expected these to be part
> of menu.p (which is, of course, supposed to be built in).
>
> Thanks for any info!
>
> ======================================
> Adrian Umpleby
> adrian@ic.ac.uk
> http://wrench.et.ic.ac.uk/adrian/
> ======================================
+++++++++++++++++++++++++++
>From ingemar@lysator.liu.se (Ingemar Ragnemalm)
Date: 15 Oct 1996 10:38:15 GMT
Organization: (none)
davea@atlas.co.uk (Dave) writes:
>This is taken from the header file Menus.h:
>extern pascal short GetMBarHeight( void )
> TWOWORDINLINE( 0x3EB8, 0x0BAA ); /* MOVE.w $0BAA,(SP) */
Which should be something like
function GetMBarHeight: Integer;
INLINE
$3EB8,$0BAA;
in Pascal (which is what the original posted asked for). I havn't tested
this though.
You can also use straight Pascail code (from the SAT lib, hence the names):
procedure SATSetMBarHeight (height: integer);
type
intPtr = ^integer;
var
ip: intPtr;
begin
ip := IntPtr(Pointer($0BAA));
{the location of the 2-byte menubar height global var}
ip^ := height;
end; {SATSetMBarHeight}
function SATGetMBarHeight: integer;
type
intPtr = ^integer;
var
ip: intPtr;
begin
ip := IntPtr(Pointer($0BAA));
{the location of the 2-byte menubar height global var}
SATGetMBarHeight := ip^;
end; {SATGetMBarHeight}
--
- -
Ingemar Ragnemalm, PhD
Image processing, Mac shareware games
E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
---------------------------
>From sean@demon.co.uk (Sean K. Harbour)
Subject: No. of Colours in PICT
Date: Mon, 07 Oct 1996 18:37:08 +0100
Organization: Focal Image Ltd
Hi,
Can anyone tell me how to extract the number of colours that are
contained (used) in a PICT file. I am able to read the size of the file in
bytes, and the bounding box, but I need to be able to differentiate between
black and white images and colour (grayscale) images.
Thanks,
Sean K. Harbour
+++++++++++++++++++++++++++
>From michel.touchot@wanadoo.fr (Michel Touchot)
Date: Mon, 7 Oct 1996 23:45:16 +0100
Organization: CRDEP
Sean K. Harbour <sean@demon.co.uk> wrote:
> Hi,
>
> Can anyone tell me how to extract the number of colours that are
> contained (used) in a PICT file. I am able to read the size of the file in
> bytes, and the bounding box, but I need to be able to differentiate between
> black and white images and colour (grayscale) images.
>
> Thanks,
>
You should try and use the freeware utility called "PICT Informer". It
will tell you the number of colours and many other things about your
PICTs
--Michel--
+++++++++++++++++++++++++++
>From sean@demon.co.uk (Sean K. Harbour)
Date: Tue, 08 Oct 1996 17:01:16 +0100
Organization: Focal Image Ltd
Hi,
>> Can anyone tell me how to extract the number of colours that are
>> contained (used) in a PICT file. I am able to read the size of the file in
>> bytes, and the bounding box, but I need to be able to differentiate between
>> black and white images and colour (grayscale) images.
>>
>>
>You should try and use the freeware utility called "PICT Informer". It
>will tell you the number of colours and many other things about your
>PICTs
>
Where do I find this utility (PICT Informer)?. I still am unable to find
documentation on how to find the number of colours in a PICT file. Where
can I get a description of all the fields/tags/format of a PICT file---is
there a web page for such graphics file formats?
Thanks,
Sean K. Harbour
+++++++++++++++++++++++++++
>From squires@crl.com (Scott Squires)
Date: Sun, 13 Oct 1996 22:49:28 -0800
Organization: Puffin Designs
In article <AE80395C9668154DB1@focal.demon.co.uk>,
sean@demon.co.uk (Sean K. Harbour) wrote:
>Hi,
>
>>> Can anyone tell me how to extract the number of colours that are
>>> contained (used) in a PICT file. I am able to read the size of the file in
>>> bytes, and the bounding box, but I need to be able to differentiate between
>>> black and white images and colour (grayscale) images.
>>>
>>>
>>You should try and use the freeware utility called "PICT Informer". It
>>will tell you the number of colours and many other things about your
>>PICTs
>>
>
>Where do I find this utility (PICT Informer)?. I still am unable to find
>documentation on how to find the number of colours in a PICT file. Where
>can I get a description of all the fields/tags/format of a PICT file---is
>there a web page for such graphics file formats?
>
Inside Mac 5 and 6 cover this. Also Inside Mac:QuickDraw.
Check the Apple developer Web pages.
There's a couple of approaches to getting number of colors.
Use the PictInfo toolbox routines. The main problem with these is
that if there isn't enough system memory they'll hang the machine.
The other is to set DrawProcs to record the colors. There are
examples on Apple's develoepr CD's. Check the web site.
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
---------------------------
>From mooncake@cs.toronto.edu (Jeff Tupper)
Subject: Other application's low-memory globals
Date: 14 Oct 96 23:41:42 GMT
Organization: CS Lab, University of Toronto
Does anyone know how to access other application's low memory
global variables? From I gather, the application-specific
low memory globals get moved into the A5 world at context
switch time.
I am trying to go through the list of windows for all active
programs, so I am specifically looking for the global
corresponding to LMGetWindowList.
Of course, if anyone knows of another way to iterate through
all the app's windows, I would love to hear it :)
Jeff
+++++++++++++++++++++++++++
>From awiner@oracle.com (Adam Winer)
Date: Mon, 14 Oct 1996 18:43:15 -0800
Organization: Oracle Corporation
In article <1996Oct14.194142.20396@jarvis.cs.toronto.edu>,
mooncake@cs.toronto.edu (Jeff Tupper) wrote:
> Does anyone know how to access other application's low memory
> global variables? From I gather, the application-specific
> low memory globals get moved into the A5 world at context
> switch time.
>
> I am trying to go through the list of windows for all active
> programs, so I am specifically looking for the global
> corresponding to LMGetWindowList.
>
> Of course, if anyone knows of another way to iterate through
> all the app's windows, I would love to hear it :)
It can't be done in any way that won't break horribly in the
future.
-- Adam Winer
awiner@us.oracle.com
--
Adam Winer
awiner@us.oracle.com
Technical Staff, Oracle Corp.
+++++++++++++++++++++++++++
>From mooncake@cs.toronto.edu (Jeff Tupper)
Date: 15 Oct 96 13:41:21 GMT
Organization: CS Lab, University of Toronto
In article <awiner-ya023060031410961843150001@newshost>,
Adam Winer <awiner@oracle.com> wrote:
>In article <1996Oct14.194142.20396@jarvis.cs.toronto.edu>,
>mooncake@cs.toronto.edu (Jeff Tupper) wrote:
>
>> Does anyone know how to access other application's low memory
>> global variables? From I gather, the application-specific
>> low memory globals get moved into the A5 world at context
>> switch time.
>>
>> I am trying to go through the list of windows for all active
>> programs, so I am specifically looking for the global
>> corresponding to LMGetWindowList.
>>
>> Of course, if anyone knows of another way to iterate through
>> all the app's windows, I would love to hear it :)
>
>It can't be done in any way that won't break horribly in the
>future.
I think that is fairly clear - I am just interested in a way
to do it now. I don't expect it to work in the future. Do
you know how I could do it now?
Jeff
>
>-- Adam Winer
>awiner@us.oracle.com
>
>--
>Adam Winer
>awiner@us.oracle.com
>Technical Staff, Oracle Corp.
---------------------------
>From ajmas@worldnet.fr (Andre-John Mas)
Subject: Possible idea: extension for Be progs
Date: Wed, 9 Oct 1996 20:26:45 +0100
Organization: SCT / Worldnet - Internet Provider & Information Exchange - Paris, France
Reading the article on MacWorld's site on Apple possible auquistion of,
or partnership with Be, I had and idea. Both companies have great
systems and both interfaces apeal to different people, after all we
don't all go around in the same car. Now the PPCP platform is coming
out Be and Apple could do a first have two operating systems, that have
a unified set of calls. What I mean is that a program writen for one
platform could work on the other.
I see the benefits as follows:
- The user gets to choose the operating system of his or her choice
- The user know that if they see a program for the Be it would
available for the Mac and vice versa. That way the user would
not have to worry about the program not being available.
- The programmer would only have to write and distribute one version
of the program.
- Apple and Be would compete between each other to provide a better
system, while the user doesn't have to worry about buying a new
version of the program every time they change their mind about their
system choice.
- A company deciding to allow the user to have the choice of system
can by the same programs for both groups.
The only down sides are:
- The programmer may have to do a bit more work
- I might not have thought about the idea enough
- I am probably being unrealistic.
That's, now for the views
Andre-John
>------------------------------ ,,,, --------------------------------<
Andre-John MAS - - Smail: 821, Chemin du Riou
Email : ajmas@worldnet.fr L 06140 Vence, France
>------------------------------ - --------------------------------<
Tel/Fax : (00)(32)(02) 732.97.17 http://myweb.worldnet.fr/~ajmas/
+++++++++++++++++++++++++++
>From msbishop@ix.netcom.com (Matt Bishop)
Date: Sun, 13 Oct 1996 15:51:33 -0500
Organization: Zippo
In article <19961009202645129341@nice0-148.sct.fr>, ajmas@worldnet.fr
(Andre-John Mas) wrote:
> Reading the article on MacWorld's site on Apple possible auquistion of,
> or partnership with Be, I had and idea. Both companies have great
> systems and both interfaces apeal to different people, after all we
> don't all go around in the same car. Now the PPCP platform is coming
> out Be and Apple could do a first have two operating systems, that have
> a unified set of calls. What I mean is that a program writen for one
> platform could work on the other.
>
> The only down sides are:
>
> - The programmer may have to do a bit more work
> - I might not have thought about the idea enough
> - I am probably being unrealistic.
>
>
I love the Be interface; anyone interested in having it now on their macs
should download BeView by Greg Landweber who wrote Aaron.
As for one programming working on both, it will be here sooner than you
think. That is what all the hubub is over Java; it is a windows-oriented
(the concept, not the OS) programming language that can run an multiple
OSs. Apple and Windows are both racing to support Java at the OS level,
freeing users from using Java viewers. When that day comes, you should
see many, many programs coming out in Java that will run on both platforms
without modification.
There are still plenty of development work left for Java to supplant
C/Pascal as programming languages, but the groundwork has been done and
the OSs are moving in the right direction. Be should support the Java
language as well.
--
-Matt Bishop
msbishop@ix.netcom.com
"Everyone needs a hug; pass it on!"
___ _____ ___
_____( \ .-' `-. / )_____
(_____ \___________ / (O O) \ ___________/ _____)
(_____ `---( ) )---' _____)
(_____ __________________\ .___. /__________________ _____)
(________/ `-._____.-' \________)
*Hug* *Hug* *Hug* *Hug* *Hug*
*Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
*Hug* *Hug* *Hug* *Hug* *hug*
*hug* *hug* *hug* *hug* *Hug*
*Hug**Hug**Hug* *Hug* *Hug* *Hug*
*Hug**Hug**Hug* *Hug* *Hug* *Hug* *Hug**Hug*
*Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
*Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
*Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
*Hug* *Hug* *Hug* *Hug*
(if you can't see it, change your font to Courier!)
+++++++++++++++++++++++++++
>From Little Saint <santino@earthlink.net>
Date: Mon, 14 Oct 1996 17:46:28 -0400
Organization: Earthlink Network, Inc.
Matt Bishop wrote:
>
> In article <19961009202645129341@nice0-148.sct.fr>, ajmas@worldnet.fr
> (Andre-John Mas) wrote:
>
> > Reading the article on MacWorld's site on Apple possible auquistion of,
> > or partnership with Be, I had and idea. Both companies have great
> > systems and both interfaces apeal to different people, after all we
> > don't all go around in the same car. Now the PPCP platform is coming
> > out Be and Apple could do a first have two operating systems, that have
> > a unified set of calls. What I mean is that a program writen for one
> > platform could work on the other.
> >
> > The only down sides are:
> >
> > - The programmer may have to do a bit more work
> > - I might not have thought about the idea enough
> > - I am probably being unrealistic.
> >
> >
>
> I love the Be interface; anyone interested in having it now on their macs
> should download BeView by Greg Landweber who wrote Aaron.
>
> As for one programming working on both, it will be here sooner than you
> think. That is what all the hubub is over Java; it is a windows-oriented
> (the concept, not the OS) programming language that can run an multiple
> OSs. Apple and Windows are both racing to support Java at the OS level,
> freeing users from using Java viewers. When that day comes, you should
> see many, many programs coming out in Java that will run on both platforms
> without modification.
>
> There are still plenty of development work left for Java to supplant
> C/Pascal as programming languages, but the groundwork has been done and
> the OSs are moving in the right direction. Be should support the Java
> language as well.
>
> --
> -Matt Bishop
> msbishop@ix.netcom.com
>
> "Everyone needs a hug; pass it on!"
>
> ___ _____ ___
> _____( \ .-' `-. / )_____
> (_____ \___________ / (O O) \ ___________/ _____)
> (_____ `---( ) )---' _____)
> (_____ __________________\ .___. /__________________ _____)
> (________/ `-._____.-' \________)
>
> *Hug* *Hug* *Hug* *Hug* *Hug*
> *Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
> *Hug* *Hug* *Hug* *Hug* *hug*
> *hug* *hug* *hug* *hug* *Hug*
> *Hug**Hug**Hug* *Hug* *Hug* *Hug*
> *Hug**Hug**Hug* *Hug* *Hug* *Hug* *Hug**Hug*
> *Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
> *Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
> *Hug* *Hug* *Hug* *Hug* *Hug* *Hug*
> *Hug* *Hug* *Hug* *Hug*
>
> (if you can't see it, change your font to Courier!)
One thing to keep in mind about Java apps is that there is great debate over whether
multi-platform GUIs will be supported with Java. What I mean is many people believe
that Java apps should have identical GUIs across all platforms. Which means no matter
what GUI you like to use on your platform, it won't be the same as the one in the Java
app.
Little Saint
---------------------------
>From meiss@interlog.com (Mark Eissler)
Subject: Reading and Writing Str#
Date: Fri, 11 Oct 1996 04:10:44 GMT
Organization: Interlog Internet Services
This is just killing me. I can't seem to find anything on this...
If I grab a couple of strings from a STR# resource using
GetIndString(), how do I modify, then write back those strings to the
STR# resource?
None of my current Mac resources seem to deal with the topic of STR#
in any depth. Not even IM. Is this some sort of secret? Reading the
things is easy, creating them with ResEdit is a breeze... But writing
them to the Resource Fork must be magic.
Any help (or even better, pointers to references) would be
appreciated.
Mark Eissler | Interlog Tech Support | Interlog Mac Support
meiss@interlog.com | support@interlog.com | macintosh@interlog.com
Interlog Internet Services http://www.interlog.com
It's never really been quite the same since blue Smarties came out.
+++++++++++++++++++++++++++
>From chris.newman@innosoft.com (Chris Newman)
Date: Fri, 11 Oct 1996 19:26:48 -0700
Organization: Altopia Corp. - Affordable Usenet Access - http://www.alt.net
In article <53kh7m$fs1@news.interlog.com>, meiss@interlog.com wrote:
>If I grab a couple of strings from a STR# resource using
>GetIndString(), how do I modify, then write back those strings to the
>STR# resource?
I suspect you have to use GetResource() and then modify the STR# Handle
directly, just like editing other resources. You might find the Munger()
function useful for this case.
+++++++++++++++++++++++++++
>From hsoi@metrowerks.com (John C. Daub)
Date: Mon, 14 Oct 1996 12:45:25 -0500
Organization: Metrowerks Corporation
Yes, you could probably do something witih Munger(), but I shudder to
think what you would have to do :)
You can also try SetIndString() a little code snippet that I gleaned
from Apple DTS. (it follows):
The only change that I might make to this would be to change the
BlockMove() calls to BlockMoveData(), but that's just me (and shows
the age of this DTS snippet)
In article <chris.newman-ya023080001110961926480001@news.alt.net>,
chris.newman@innosoft.com (Chris Newman) wrote:
>In article <53kh7m$fs1@news.interlog.com>, meiss@interlog.com wrote:
>>If I grab a couple of strings from a STR# resource using
>>GetIndString(), how do I modify, then write back those strings to the
>>STR# resource?
>
>I suspect you have to use GetResource() and then modify the STR# Handle
>directly, just like editing other resources. You might find the Munger()
>function useful for this case.
==========
OSErr SetIndString(StringPtr theStr,short resID,short strIndex)
{
Handle theRes; /* handle pointing to STR# resource */
short numStrings; /* number of strings in STR# */
short ourString; /* counter to index up to strIndex */
char *resStr; /* string pointer to STR# string to replace */
long oldSize; /* size of STR# resource before call */
long newSize; /* size of STR# resource after call */
unsigned long offset; /* resource offset to str to replace*/
/* make sure index is in bounds */
if (resID < 1)
return -1;
/* make sure resource exists */
theRes = GetResource('STR#',resID);
if (ResError()!=noErr)
return ResError();
if (!theRes || !(*theRes))
return resNotFound;
HLock(theRes);
HNoPurge(theRes);
/* get # of strings in STR# */
BlockMove(*theRes,&numStrings,sizeof(short));
if (strIndex > numStrings)
return resNotFound;
/* get a pointer to the string to replace */
offset = sizeof(short);
resStr = (char *) *theRes + sizeof(short);
for (ourString=1; ourString<strIndex; ourString++) {
offset += 1+resStr[0];
resStr += 1+resStr[0];
}
/* grow/shrink resource handle to make room for new string */
oldSize = GetHandleSize(theRes);
newSize = oldSize - resStr[0] + theStr[0];
HUnlock(theRes);
SetHandleSize(theRes,newSize);
if (MemError()!=noErr) {
ReleaseResource(theRes);
return -1;
}
HLock(theRes);
resStr = *theRes + offset;
/* move old data forward/backward to make room */
BlockMove(resStr+resStr[0]+1, resStr+theStr[0]+1,
oldSize-offset-resStr[0]-1);
/* move new data in */
BlockMove(theStr,resStr,theStr[0]+1);
/* write resource out */
ChangedResource(theRes);
WriteResource(theRes);
HPurge(theRes);
ReleaseResource(theRes);
return ResError();
}
--
John C. Daub | Metrowerks Corporation
Metrowerks Technical Support | 2201 Donley Drive, Suite 310
PowerPlant Pundit | Austin, Texas 78758 USA
<mailto:hsoi@metrowerks.com> | <http://www.metrowerks.com/>
+++++++++++++++++++++++++++
>From gregj@europa.com (Greg Jorgensen)
Date: Mon, 14 Oct 1996 22:35:14 -0800
Organization: RAINet
In article <53kh7m$fs1@news.interlog.com>, meiss@interlog.com wrote:
>This is just killing me. I can't seem to find anything on this...
>
>If I grab a couple of strings from a STR# resource using
>GetIndString(), how do I modify, then write back those strings to the
>STR# resource?
>
>None of my current Mac resources seem to deal with the topic of STR#
>in any depth. Not even IM. Is this some sort of secret? Reading the
>things is easy, creating them with ResEdit is a breeze... But writing
>them to the Resource Fork must be magic.
>
>Any help (or even better, pointers to references) would be
>appreciated.
Someone wrote and posted a library of functions to work with STR#
resources a little while ago... have you tried searching InfoMac or
DejaNews?
If you don't use that code, you'll have to roll your own. It's pretty
easy. An STR# resource is simply a (short integer, 2-byte) count of the
number of strings, followed by that many Pascal-style strings with no
padding or anything. One way to do it: for each STR# resource create an
array of n StringPtrs, one for each string in the resource:
Handle h = GetResource('STR#', id);
if ( h ) {
HLock(h);
short count = *((short *)*h); // get the count
StringPtr *strings = new StringPtr[count];
// loop through strings setting up pointers
StringPtr p = StringPtr(*h + sizeof(short));
for ( short i = 0; i < count; ++i ) {
strings[i] = p;
p += *p + 1; // point to next string
}
}
Whenever you change a string, replace the pointer with your string:
strings[k] = mynewstring; // a Str255, StringPtr, whatever
Then to create a new resource, add up the sizes and copy the strings to a
new handle. You could be keeping track of the total length as you change
the strings, too.
Size maxsize = (count * 256) + sizeof(short); // max rsrc size
Handle new_h = NewHandle( maxsize );
if ( new_h ) {
*((short *)*new_h) = count;
StringPtr p = StringPtr(*new_h + sizeof(short));
for ( short i = 0; i < count; ++i ) {
if ( strings[i] ) {
memcpy(p, strings[i], strings[i][0]);
p += strings[i][0] + 1;
}
else
*p++ = 0; // empty string
}
// replace the old resource data with the new
Size thesize = Ptr(p) - *new_h;
HUnlock(h);
SetHandleSize(h, thesize); // should check result
memcpy(*h, *new_h, thesize);
WriteResource(h);
DisposeHandle(new_h);
}
That's a sloppy online version, but you get the idea. I'd look at that
STR# library first.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"In a recent fire, [Bob] Dole's library burned down. Both books were lost. And he hadn't even finished coloring one." -- Jack Kemp
---------------------------
>From melepano@mail2.sas.upenn.edu (Michael W Elepano)
Subject: SPBSetDeviceInfo Question
Date: 10 Oct 1996 17:26:04 GMT
Organization: University of Pennsylvania
Hello:
In my application, I'm trying to set the device-- the microphone-- to
11KHZ before recording. I'm using the SPBSetDeviceInfo call but am
getting a -225 error each time.
I've put many different variations of the desired sample rate in the
third variable of the function. I've tried typecasting, pointers,
addresses, and countless parenthesis.
Has anyone successfully used this function? Can anyone help me?
TIA
Mikey
+++++++++++++++++++++++++++
>From reekes@apple.com (Jim Reekes)
Date: Thu, 10 Oct 1996 15:42:12 -0700
Organization: Apple Computer, Inc.
In article <53jbjc$h1f@netnews.upenn.edu>, melepano@mail2.sas.upenn.edu
(Michael W Elepano) wrote:
> Hello:
>
> In my application, I'm trying to set the device-- the microphone-- to
> 11KHZ before recording. I'm using the SPBSetDeviceInfo call but am
> getting a -225 error each time.
A quick look at Errors.h tells us you're getting "siInvalidSampleRate"
which seems logical. So you must be attempting to set the hardware to a
rate that it cannot support.
> I've put many different variations of the desired sample rate in the
> third variable of the function. I've tried typecasting, pointers,
> addresses, and countless parenthesis.
Have you tried to use the siSampleRateAvailable selector to find out which
rates are actually supported by the device your using?
> Has anyone successfully used this function?
Of course.
Jim
--
Jim Reekes, Polterzeitgeist | QuickTime Products R&D
| Sound Manager Expert
Apple Computer, Inc. | "All opinions expressed are mine, and
2 Infinite Loop MS 302-3KS | do not necessarily represent those
Cupertino, CA 95014 | of my employer, Apple Computer Inc."
+++++++++++++++++++++++++++
>From lroathe@ifd.com (Lane Roathe)
Date: Thu, 10 Oct 1996 22:38:41 -0800
Organization: Ideas From the Deep, Ltd.
In article <reekes-1010961542120001@reekji.apple.com>, reekes@apple.com
(Jim Reekes) wrote:
>In article <53jbjc$h1f@netnews.upenn.edu>, melepano@mail2.sas.upenn.edu
>(Michael W Elepano) wrote:
>
>> Hello:
>>
>> In my application, I'm trying to set the device-- the microphone-- to
>> 11KHZ before recording. I'm using the SPBSetDeviceInfo call but am
>> getting a -225 error each time.
>
>A quick look at Errors.h tells us you're getting "siInvalidSampleRate"
>which seems logical. So you must be attempting to set the hardware to a
>rate that it cannot support.
>
>> I've put many different variations of the desired sample rate in the
>> third variable of the function. I've tried typecasting, pointers,
>> addresses, and countless parenthesis.
>
>Have you tried to use the siSampleRateAvailable selector to find out which
>rates are actually supported by the device your using?
>
>> Has anyone successfully used this function?
>
>Of course.
I ran into this very problem, and my solution was to query the device on
what sample rates are supported, and then either a) insure my rate is
between the supported rates, or b) choose the closest rate available. It's
a lot of code, but you can do it once at the beginning of the program if
you use a single rate.
(I don't. Sure would be nice if we could have a "closest match" rate...)
_________________________________________________________________
Lane Roathe, Authorized Representative, Ideas From the Deep. Ltd.
Distribution in any form by Microsoft or Prodigy is PROHIBITED!!!
-->Unsolicited bulk email will be proofread @ $500/K, 2K minimum!
Views expressed are my own, not IFD's! Content (c) Copyright 1996
<http://www.ifd.com/lane> <http://www.ifd.com>
+++++++++++++++++++++++++++
>From lroathe@ifd.com (Lane Roathe)
Date: Tue, 15 Oct 1996 01:28:08 -0800
Organization: Ideas From the Deep, Ltd.
In article <53ljh4$qg3@netnews.upenn.edu>, melepano@mail2.sas.upenn.edu
(Michael W Elepano) wrote:
>#include <Sound.h>
>#include <SoundInput.h>
>
>unsigned long mySr; //I've tried everything here between char and float
>OSErr err;
>
>mySR=rate11khz; //I've tried 11000,11127.2727,11025, ad nauseum
>
>err=SPBSetDeviceInfo(SoundRefNum,siSampleRate,(Ptr)&mySr);
>if (err!=noErr)
> Debugger();
>
>Why is this code bad?
You must pass a Fixed value! (which is not the same as a long, which is
why the numbers make no sense when viewed.) This works:
Fixed rate;
rate = Long2Fix( 11000 );
err = SPBSetDeviceInfo( soundRefNum, siSampleRate, &rate );
Hope this helps!
_________________________________________________________________
Lane Roathe, Authorized Representative, Ideas From the Deep. Ltd.
Distribution in any form by Microsoft or Prodigy is PROHIBITED!!!
-->Unsolicited bulk email will be proofread @ $500/K, 2K minimum!
Views expressed are my own, not IFD's! Content (c) Copyright 1996
<http://www.ifd.com/lane> <http://www.ifd.com>
+++++++++++++++++++++++++++
>From Jackson Software Development <development@jacksoncorp.com>
Date: 15 Oct 1996 14:06:47 GMT
Organization: Jackson Software
In article <lroathe-1510960128080001@news> Lane Roathe, lroathe@ifd.com
writes:
>You must pass a Fixed value! (which is not the same as a long, which is
>why the numbers make no sense when viewed.) This works:
>
>Fixed rate;
>
>rate = Long2Fix( 11000 );
>err = SPBSetDeviceInfo( soundRefNum, siSampleRate, &rate );
Actually it's not quite a Fixed number. The high bit = 32767 (I think).
It's sort of an unsigned fixed. This is important for values greater than
32Khz (like the ever important 44.1kHz and 48kHz).
Darrin
---------------------------
>From Rich Schroedel <richs@win.bright.net>
Subject: Symantec Project Managers
Date: Tue, 01 Oct 1996 12:41:26 -0600
Organization: BrightNet Wisconsin
(I posted the text below to Symantec tech support this morning, but it
occured to me that I can probably get a much quicker responce here.)
I just replaced my old Project manager with the new one on the "Symantec
Cafe DR1" CD-ROM. Now it refused to compile C++ source code.
I assumed that it was a superset of the old project manager. Was I
wrong?
If so, how can I manage both C++ and Java projects on the same disk,
when the Mac automatically chooses the application when I double click
on a project file? If one is not a subset of the other shouldn't the
Java project manager have a different Creator code than "SPM"?
--
Rich Schroedel "There is only one success...
Ondossagon Software to live your life in your own way"
richs@win.bright.net Christopher Marlowe
+++++++++++++++++++++++++++
>From tree@apple.com (Tom Emerson)
Date: Tue, 01 Oct 1996 15:36:22 -0400
Organization: Apple Computer, Inc.
In article <325165D4.6CF3@win.bright.net>, Rich Schroedel
<richs@win.bright.net> wrote:
>I just replaced my old Project manager with the new one on the "Symantec
>Cafe DR1" CD-ROM. Now it refused to compile C++ source code.
D'oh.
>I assumed that it was a superset of the old project manager. Was I
>wrong?
Yup. I think the fact that the DR1 SPM is Java-centric is documented in the
release notes. The DR2 SPM works for both.
The original intent was to have a single SPM that would work for both,
though due to pressures from upper management to get something to market we
had to cut corners.
>If so, how can I manage both C++ and Java projects on the same disk,
>when the Mac automatically chooses the application when I double click
>on a project file?
You can't. Make alii on your desktop or use a launcher.
>If one is not a subset of the other shouldn't the
>Java project manager have a different Creator code than "SPM"?
This was debated hotly, and it was decided not to do this for a number of
reasons, one of the most compelling being that changing the creator would
have detrimentaly effects on existing scripts and external tool support.
-tre
--
Tom Emerson Cambridge R&D
Senior Software Engineer Apple Computer, Inc.
<mailto:tree@apple.com> <http://www.tiac.net/users/tree>
+++++++++++++++++++++++++++
>From Michael Taylor <michaelt@elec.gla.ac.uk>
Date: Fri, 11 Oct 1996 12:27:55 +0000
Organization: Nanoelectronics Research Centre
Tom Emerson wrote:
> >If so, how can I manage both C++ and Java projects on the same disk,
> >when the Mac automatically chooses the application when I double click
> >on a project file?
>
> You can't. Make alii on your desktop or use a launcher.
>
> --
> Tom Emerson Cambridge R&D
> Senior Software Engineer Apple Computer, Inc.
> <mailto:tree@apple.com> <http://www.tiac.net/users/tree>
That's what I like to see, someone with a classical education.
Michael
--
___________________________________________________________________
|Michael Taylor |email:michaelt@elec.gla.ac.uk |
|Nanoelectronics Research Centre, |tel :(44)-141-330-4795 |
|Dept. of Electronics and Elec. Eng.,|fax :(44)-141-330-4907 |
|The University of Glasgow, | |
|Glasgow G12 8LT, Scotland, UK. | |
| http://www.elec.gla.ac.uk/~michaelt |
|____________________________________|______________________________|
+++++++++++++++++++++++++++
>From sw@nan.co.uk (Sak Wathanasin)
Date: Sun, 13 Oct 1996 11:04:48 GMT
Organization: Network Analysis Ltd
In article <325E3D4A.48C@elec.gla.ac.uk>, m.taylor@elec.gla.ac.uk wrote:
> > You can't. Make alii on your desktop or use a launcher.
> >
>
> > --
> > Tom Emerson Cambridge R&D
> > ....
> That's what I like to see, someone with a classical education.
Hmmm, I think a charge of pedantry could be levelled against Mr Emerson.
Fowler* says that while there is no hard and fast rule, "... there is a
tendency to abandon the Latin plurals, and that, when one is really in
doubt which to use, the English form should be given preference." The OED
gives "aliases" as the plural and doesn't have "alii" as an alternative. Is
there a dictionary that prefers the latter form?
* In "Modern English Usage" under "Latin plurals".
--
Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK
Internet: sw@nan.co.uk
uucp: ...!britain.eu.net!nan!sw
Phone: (+44) 1203 419996 Fax: (+44) 1203 690690
+++++++++++++++++++++++++++
>From bfitz@acm.org (Brian Fitzgerald)
Date: Mon, 14 Oct 1996 00:25:20 -0700
Organization: Future Tense
In article <sw-ya023180001310961204480001@newshost.nan.co.uk>,
sw@nan.co.uk (Sak Wathanasin) wrote:
> Hmmm, I think a charge of pedantry could be levelled against Mr Emerson.
> Fowler* says that while there is no hard and fast rule, "... there is a
> tendency to abandon the Latin plurals, and that, when one is really in
> doubt which to use, the English form should be given preference." The OED
> gives "aliases" as the plural and doesn't have "alii" as an alternative. Is
> there a dictionary that prefers the latter form?
Much ado about nothing. The plural of alias is aliaii. Monsieur Emerson
was then extrapolating to somewhere around the year 2019 where the middle
syllable is dropped (common words are compressed to as few syllables as
are intelligble).
--
Brian Fitzgerald
Future Point
---------------------------
>From bilewicz@helf4.physik.fu-berlin.de (Roger Bilewicz)
Subject: Think Pascal: where is HasDepth declared ??
Date: 14 Oct 96 12:21:54 GMT
Organization: Freie Universitaet Berlin
Hi all,
I can't find where the function HasDepth is declared.
It belongs to QuickDraw/Graphics Devices, but I cannot find it in all
the interface files, neither the old ones (preferred!) nor in the
Universal Headers.
Unfortunately, the trap number isn't given in Inside Mac either.
Who can help?
TIA,
Roger
+++++++++++++++++++++++++++
>From lottsim@aol.com (LOTTSIM)
Date: 14 Oct 1996 18:11:48 -0400
Organization: America Online, Inc. (1-800-827-6364)
#include <Palettes.h>
That works fine in my apps that require this call.
Alex Rampell
+++++++++++++++++++++++++++
>From ingemar@lysator.liu.se (Ingemar Ragnemalm)
Date: 15 Oct 1996 10:40:24 GMT
Organization: (none)
bilewicz@helf4.physik.fu-berlin.de (Roger Bilewicz) writes:
>I can't find where the function HasDepth is declared.
>It belongs to QuickDraw/Graphics Devices, but I cannot find it in all
>the interface files, neither the old ones (preferred!) nor in the
>Universal Headers.
>Unfortunately, the trap number isn't given in Inside Mac either.
It is in Palettes.p (at least in the old interfaces).
Use BBedit to search through the interfaces. It will find the right
interface file in seconds.
--
- -
Ingemar Ragnemalm, PhD
Image processing, Mac shareware games
E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
+++++++++++++++++++++++++++
>From ingemar@lysator.liu.se (Ingemar Ragnemalm)
Date: 15 Oct 1996 10:43:02 GMT
Organization: (none)
lottsim@aol.com (LOTTSIM) writes:
>#include <Palettes.h>
>That works fine in my apps that require this call.
The subject says "Think Pascal", where we rather say:
uses Palettes;
Palettes.p happens to be the right interface, but the C and Pascal interfaces
sometimes differ.
--
- -
Ingemar Ragnemalm, PhD
Image processing, Mac shareware games
E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
---------------------------
>From john clarke <johnc@lallink.demon.co.uk>
Subject: Transparant blitter.
Date: Mon, 30 Sep 1996 22:31:14 +0000
Organization: (none)
I found a nice(fast) way of doing a transparant (50% source 50%
destination) blit in 16bit colour, that could also be easily adapted to
32bit colour.
If anyone is interested, I'll post the source (it's only about a dozen
lines).
Alex Clarke
+++++++++++++++++++++++++++
>From erickson@cet.com (Ian K. Erickson)
Date: Mon, 30 Sep 1996 18:17:21 -0800
Organization: Cutting Edge Technologies
In article <32504A32.114D@lallink.demon.co.uk>, john clarke
<johnc@lallink.demon.co.uk> wrote:
> I found a nice(fast) way of doing a transparant (50% source 50%
> destination) blit in 16bit colour, that could also be easily adapted to
> 32bit colour.
>
> If anyone is interested, I'll post the source (it's only about a dozen
> lines).
Yeah, I'd like to see it! Post away, CodeWarrior.
--
<^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>
<No matter when you go, Ian K. Erickson >
<then you are. erickson@cet.com >
<vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv>
+++++++++++++++++++++++++++
>From john clarke <johnc@lallink.demon.co.uk>
Date: Tue, 01 Oct 1996 08:28:44 +0000
Organization: (none)
Hopefully this should be fairly self explanitory. They seem pretty
quick in my tests on a 7200/90 with CW10.
Transparant_Cheap16bit_Blit() produces slightly darker results than the
more expensive Transparant_16bit_Blit(), which takes account of the
least significant bits. They work on two pixels at a time, and no
attempt has been made to get these to work with odd x paramaters. It
would be trivial to get this to work with 32bit colour.
Cheers, Alex Clarke
void Transparant_Cheap16bit_Blit(
unsigned long *src_ptr,
long src_rowBytes,
unsigned long *dst_ptr,
long dst_rowBytes,
long src_x1,
long src_y1,
long src_x2,
long src_y2,
long dst_x1,
long dst_y1)
{
register unsigned long mask=0x7BDE7BDE;
register unsigned long *src_ptr_copy,*dst_ptr_copy;
register long num_of_longs=(src_x2-src_x1)>>1;
register long x,y;
src_ptr=(unsigned
long*)(((long)src_ptr)+(src_y1*src_rowBytes)+(src_x1<<1)-4);
dst_ptr=(unsigned
long*)(((long)dst_ptr)+(dst_y1*dst_rowBytes)+(dst_x1<<1)-4);
for (y=src_y1;y<src_y2;y++)
{
src_ptr_copy=src_ptr;
dst_ptr_copy=dst_ptr;
for (x=0;x<num_of_longs;x++)
{
register unsigned long src_word=*(++src_ptr_copy);
register unsigned long dst_word=*(++dst_ptr_copy);
src_word&=mask;
dst_word&=mask;
dst_word+=src_word;
dst_word>>=1;
*(dst_ptr_copy)=dst_word;
}
src_ptr=(unsigned long*)(((long)src_ptr)+src_rowBytes);
dst_ptr=(unsigned long*)(((long)dst_ptr)+dst_rowBytes);
}
}
void Transparant_16bit_Blit(
unsigned long *src_ptr,
long src_rowBytes,
unsigned long *dst_ptr,
long dst_rowBytes,
long src_x1,
long src_y1,
long src_x2,
long src_y2,
long dst_x1,
long dst_y1)
{
register unsigned long mask=0x7BDE7BDE;
register unsigned long carry_mask=0x4210421;
register unsigned long *src_ptr_copy,*dst_ptr_copy;
register long num_of_longs=(src_x2-src_x1)>>1;
register long x,y;
src_ptr=(unsigned
long*)(((long)src_ptr)+(src_y1*src_rowBytes)+(src_x1<<1)-4);
dst_ptr=(unsigned
long*)(((long)dst_ptr)+(dst_y1*dst_rowBytes)+(dst_x1<<1)-4);
for (y=src_y1;y<src_y2;y++)
{
src_ptr_copy=src_ptr;
dst_ptr_copy=dst_ptr;
for (x=0;x<num_of_longs;x++)
{
register unsigned long src_word=*(++src_ptr_copy);
register unsigned long dst_word=*(++dst_ptr_copy);
register unsigned long carry=src_word | dst_word;
src_word&=mask;
dst_word&=mask;
carry&=carry_mask;
dst_word+=src_word;
dst_word>>=1;
dst_word|=carry;
*(dst_ptr_copy)=dst_word;
}
src_ptr=(unsigned long*)(((long)src_ptr)+src_rowBytes);
dst_ptr=(unsigned long*)(((long)dst_ptr)+dst_rowBytes);
}
}
+++++++++++++++++++++++++++
>From harding@netaxis.com (Leander Harding)
Date: Tue, 01 Oct 1996 15:31:11 -0500
Organization: SoftBlade Digital Entertainment
In article <32504A32.114D@lallink.demon.co.uk>, john clarke
<johnc@lallink.demon.co.uk> wrote:
> I found a nice(fast) way of doing a transparant (50% source 50%
> destination) blit in 16bit colour, that could also be easily adapted to
> 32bit colour.
>
> If anyone is interested, I'll post the source (it's only about a dozen
> lines).
Post away - I'd be interested....
Check Six!
-Leander
<harding@netaxis.com>|<http://www.netaxis.com/~harding/>
+++++++++++++++++++++++++++
>From Russ Hendy <Russ@tui.co.uk>
Date: Tue, 01 Oct 1996 17:43:30 +0000
Organization: tui interactive media
yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah
yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah
yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah yeah
yeah yeah yeah
Russ.
+++++++++++++++++++++++++++
>From john clarke <johnc@lallink.demon.co.uk>
Date: Wed, 02 Oct 1996 17:52:44 +0000
Organization: (none)
Did you get it to work?
If so, what do you think?
Alex Clarke
+++++++++++++++++++++++++++
>From kptben@aol.com (KPT Ben)
Date: 8 Oct 1996 04:01:50 -0400
Organization: America Online, Inc. (1-800-827-6364)
In article <32504A32.114D@lallink.demon.co.uk>, john clarke
<johnc@lallink.demon.co.uk> wrote:
> I found a nice(fast) way of doing a transparant (50% source 50%
> destination) blit in 16bit colour, that could also be easily adapted to
> 32bit colour.
If you want a real challenge, try writing a fast routine to _add_ two
24-bit pixel values with saturation (32-bit ARGB format, alpha ignored).
e.g.
pixel 1: A = ?? R = 22 G = 201 B = 88
pixel 2: A = ?? R = 66 G = 179 B = 11 +
___________________________________________
result: A = ?? R = 88 G = 255 B = 99 (G saturates to 255)
Note that the carry bit from G is not allowed to overflow into R. I found
a way to do this in the general case with just 8 arithmetic/logical
instructions, no branches, 6 cycles on a 604. A related technique gives
bytewise min/max algorithms with similar efficiency. See if you can find
the algorithm I used!
--
Ben Weiss
Imaging Scientist
MetaTools Inc.
+++++++++++++++++++++++++++
>From gchapman@irus.rri.uwo.ca (Greg Chapman)
Date: Thu, 10 Oct 1996 12:22:31 -0500
Organization: Robarts Research Institute
In article <53d1pe$mio@newsbf02.news.aol.com>, kptben@aol.com (KPT Ben) wrote:
> Note that the carry bit from G is not allowed to overflow into R. I found
> a way to do this in the general case with just 8 arithmetic/logical
> instructions, no branches, 6 cycles on a 604. A related technique gives
> bytewise min/max algorithms with similar efficiency. See if you can find
> the algorithm I used!
I hate it when people tease like that. :)
--
Greg Chapman
Mac Developer - Robarts Research Institute
Imaging Research Labs
- -
"You! Out of the gene pool!"
+++++++++++++++++++++++++++
>From David Matiskella <matiskel@aa.washington.edu>
Date: Fri, 11 Oct 1996 12:06:58 -0700
Organization: University of Washington
On Thu, 10 Oct 1996, Greg Chapman wrote:
> In article <53d1pe$mio@newsbf02.news.aol.com>, kptben@aol.com (KPT Ben) wrote:
>
> > Note that the carry bit from G is not allowed to overflow into R. I found
> > a way to do this in the general case with just 8 arithmetic/logical
> > instructions, no branches, 6 cycles on a 604. A related technique gives
> > bytewise min/max algorithms with similar efficiency. See if you can find
> > the algorithm I used!
>
> I hate it when people tease like that. :)
>
> --
> Greg Chapman
> Mac Developer - Robarts Research Institute
> Imaging Research Labs
> ---
> "You! Out of the gene pool!"
>
I want to know how you do it with out compares. Have to dig out my
PPC manuals and look for some nifty instructions.
David Matiskella
matiskel@aa.washington.edu
+++++++++++++++++++++++++++
>From kptben@aol.com (KPT Ben)
Date: 14 Oct 1996 03:40:19 -0400
Organization: America Online, Inc. (1-800-827-6364)
d88-bli@xbyse.nada.kth.se (Bo Lindbergh) wrote:
>In article <53d1pe$mio@newsbf02.news.aol.com> kptben@aol.com (KPT Ben)
writes:
>>
>> If you want a real challenge, try writing a fast routine to _add_ two
>> 24-bit pixel values with saturation (32-bit ARGB format, alpha
ignored).
>
>[example snipped]
>
>> I found a way to do this in the general case with just 8
>> arithmetic/logical instructions, no branches, 6 cycles on a 604.
>
>Does it handle correctly the case where the low byte overflows and the
>middle byte adds up to FF? Example: 123456+AACBAA should make BCFFFF.
Indeed it does :) The channels do not interfere with each other in any
way.
If you don't care if an overflow causes the channel to the left to
increase by 1 (still pinned to 0xFF), e.g.
11 33 BB +
AA 44 AA =
________
BB 78 FF (green channel one shade lighter due to red overflow)
then you can do it in 7 instructions. If the red overflow causes green to
overflow as well, then blue will increment by one, e.g:
11 FF FF +
AA 00 01 =
________
BC FF FF (red overflow winds up incrementing blue by one)
An eighth instruction is required to avoid this channel interference in
all cases.
-Ben
+++++++++++++++++++++++++++
>From d88-bli@xbyse.nada.kth.se (Bo Lindbergh)
Date: 13 Oct 1996 21:23:34 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
In article <53d1pe$mio@newsbf02.news.aol.com> kptben@aol.com (KPT Ben) writes:
>
> If you want a real challenge, try writing a fast routine to _add_ two
> 24-bit pixel values with saturation (32-bit ARGB format, alpha ignored).
[example snipped]
> I found a way to do this in the general case with just 8
> arithmetic/logical instructions, no branches, 6 cycles on a 604.
Does it handle correctly the case where the low byte overflows and the
middle byte adds up to FF? Example: 123456+AACBAA should make BCFFFF.
/Bo Lindbergh
---------------------------
>From Josh Birnbaum <J_Birnbaum@fbp-ny.com>
Subject: Trap Patching...
Date: Mon, 14 Oct 1996 01:52:41 -0500
Organization: Razor Rug
Hi,
What exactly is trap patching and for what is it used. A code exaple of
it's use would be appreciated along with an explanation.
My e-mail address is at the bottom of this mail.
Thanx,
Josh...
J_Birnbaum@fbp-ny.com
+++++++++++++++++++++++++++
>From davea@atlas.co.uk (Dave)
Date: Mon, 14 Oct 1996 15:53:31 +0000
Organization: Atlas Internet
You can patch a trap to do many different things.
A typical example is to fix a bug, ie a trap doesnt preserve registers
correctly after completion, So you could patch the trap to save registers
and restore them after the call.
You could patch the shutdown trap and add a routine to back-up some data.
You could patch the SysBeep trap to disable sounds during certain times of day
You could patch the disk insert trap to eject the floppy disk, thus
rendering the A. driver uselss - Sys Admin's may not want anyone to insert
floppies onto Networked machines.
..... etc....etc....etc....
Dave
Examples?
Use one of the many search engines and specify the type of code example
you are looking for.
In article <3261E330.5DB0@fbp-ny.com>, J_Birnbaum@fbp-ny.com wrote:
> Hi,
>
> What exactly is trap patching and for what is it used. A code exaple of
> it's use would be appreciated along with an explanation.
> My e-mail address is at the bottom of this mail.
>
> Thanx,
>
> Josh...
> J_Birnbaum@fbp-ny.com
+++++++++++++++++++++++++++
>From blob@ricochet.net
Date: Mon, 14 Oct 1996 09:42:11 -0700
Organization: (none)
In article <3261E330.5DB0@fbp-ny.com>, J_Birnbaum@fbp-ny.com wrote:
> What exactly is trap patching and for what is it used. A code exaple of
> it's use would be appreciated along with an explanation.
See Inside Macintosh:Operating System Utilities, chapter 8, the Trap
Manager. Also see the book "A Fragment of Your Imagination" by Joe Zobkiw.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
---------------------------
+++++++++++++++++++++++++++
>From David Matiskella <matiskel@aa.washington.edu>
Date: Fri, 4 Oct 1996 16:34:41 -0700
Organization: University of Washington
On Sat, 5 Oct 1996, christopher wrote:
> Where is the address of the video ram
> for writing it directly??
>
> because Quickdraw is to slow for a demo.
>
> thanks
>
The address isn't fixed. Develop had an article on writing directly to the
screen which tells you all the gotchas.
That being said the simplest method is to create a window on the
screen. YOu can then get the base Address and rowbytes.
David Matiskella
matiskel@aa.washington.edu
+++++++++++++++++++++++++++
>From christopher.le@inforoute.cgs.fr (christopher)
Date: Sat, 5 Oct 1996 13:03:25 +0200
Organization: Guest of OLEANE - PIPEX International
David Matiskella <matiskel@aa.washington.edu> wrote:
> On Sat, 5 Oct 1996, christopher wrote:
>
> > Where is the address of the video ram
> > for writing it directly??
> >
> > because Quickdraw is to slow for a demo.
> >
> > thanks
> >
> The address isn't fixed. Develop had an article on writing directly to the
> screen which tells you all the gotchas.
> That being said the simplest method is to create a window on the
> screen. YOu can then get the base Address and rowbytes.
>
> David Matiskella
> matiskel@aa.washington.edu
Where can i find this article please, because i live in France.
because i can get the base addresse with the function
LMGetScrnBase(), but to put a black Rectangle on the screen, is slower
than to put a black Rectangle with QuickDraw...!!
on a Mac IIci it's take 2 or 3 seconds..!!
just with a pointer..!!
+++++++++++++++++++++++++++
>From jstiles@uclink4.berkeley.edu (John Stiles)
Date: Sat, 05 Oct 1996 23:53:40 -0800
Organization: Data Communication and Newtorking Services
> Where is the address of the video ram
> for writing it directly??
>
> because Quickdraw is to slow for a demo.
I suggest that you:
1) Make a window (easy peasy, GetNewCWindow)
2) Allocate a GWorld (Apple has lots of nice sample code for this)
3) Render your graphics in the GWorld; you can access it completely
without violating any Apple guidelines
4) Use CopyBits to blast your GWorld onscreen every frame
This method is Apple-sanctioned yet still quite fast.
Have fun!
*Stiles
+++++++++++++++++++++++++++
>From Robert van Uitert <rvu@pi.net>
Date: Sun, 06 Oct 1996 14:19:28 +0000
Organization: Three-Space Interactive
christopher wrote:
>
> Where is the address of the video ram
> for writing it directly??
>
> because Quickdraw is to slow for a demo.
>
> thanks
GDHandle device = GetMainDevice(); // the screen with the menu bar
PixMapHandle pixMap = (*device)->gdPMap;
Ptr baseAddr = GetPixBaseAddr(pixMap); // or: (*pixMap)->baseAddr
short rowBytes = (*pixMap)->rowBytes & 0x3FFF;
+++++++++++++++++++++++++++
>From christopher.le@inforoute.cgs.fr (christopher)
Date: Mon, 7 Oct 1996 20:07:36 +0200
Organization: Guest of OLEANE - PIPEX International
Robert van Uitert <rvu@pi.net> wrote (ecrivait):
> GDHandle device = GetMainDevice(); // the screen with the menu bar
> PixMapHandle pixMap = (*device)->gdPMap;
> Ptr baseAddr = GetPixBaseAddr(pixMap); // or: (*pixMap)->baseAddr
> short rowBytes = (*pixMap)->rowBytes & 0x3FFF;
yes, but we can get this address with the function GetLMScrnBase() with
codeWarrior.
but it's too slow for a fast animation.
with a Mac IIci it take 1.2 sec for draw a large Rect on the screen with
a pointer.
can't we draw offscreen and then change the ScrnBase, or directly draw
into the VRam.
thank you for this answers.
Christopher le
+++++++++++++++++++++++++++
>From jstiles@uclink4.berkeley.edu (John Stiles)
Date: Mon, 07 Oct 1996 12:51:56 -0800
Organization: University of California, Berkeley
> yes, but we can get this address with the function GetLMScrnBase() with
> codeWarrior.
> but it's too slow for a fast animation.
> with a Mac IIci it take 1.2 sec for draw a large Rect on the screen with
> a pointer.
QuickDraw doesn't use any special technique that you can't use!
It just writes to screen as well.
What kind of pointer did you use? (byte *)? This will be slow.
Byte-for-byte copies are not very optimized.
Try (long *). Also, try unrolling loops.
> can't we draw offscreen and then change the ScrnBase,
Certainly not! <CRASH> :(
>or directly draw
> into the VRam.
Drawing to ScrnBase is writing directly to VRAM!
*Stiles
+++++++++++++++++++++++++++
>From jmunkki@alpha.hut.fi (Juri Munkki)
Date: 8 Oct 1996 08:24:03 GMT
Organization: Helsinki University of Technology
In article <1996100720073642008@dyn-5.vin.oleane.com> christopher.le@inforoute.cgs.fr (christopher) writes:
>yes, but we can get this address with the function GetLMScrnBase() with
>codeWarrior. but it's too slow for a fast animation.
>with a Mac IIci it take 1.2 sec for draw a large Rect on the screen with
>a pointer.
>can't we draw offscreen and then change the ScrnBase, or directly draw
>into the VRam.
Repeat 100 times:
The Macintosh is not an Amiga
(This request is because I think the Amiga is one of the few "modern" machines
where video can be placed just about anywhere in RAM.)
Then read the Inside Mac material on QuickDraw and Graphics Devices
until you fully understand the issues involved. The low memory variable
that you mentioned is only the tip of the iceberg and once you know
how to program Mac video directly, you will never even think of using
it for anything.
Also, if drawing something on screen takes your code 1.2 seconds on a IIci,
then there's a serious problem with your code and how it is organized.
--
Juri Munkki jmunkki@iki.fi Life is easy when polygons are cheap.
http://www.iki.fi/jmunkki Windsurfing: Faster than the wind.
+++++++++++++++++++++++++++
>From nolram@panix.com (Marlon Sarmiento)
Date: Sat, 12 Oct 1996 10:43:03 -0500
Organization: Nolram
In article <53d333$5vu@nntp.hut.fi>, jmunkki@alpha.hut.fi (Juri Munkki) wrote:
> Repeat 100 times:
>
> The Macintosh is not an Amiga
>
> (This request is because I think the Amiga is one of the few "modern" machines
> where video can be placed just about anywhere in RAM.)
Actually many "home systems" did allow this, the 8-bit Atari's alowed
many of flipping techniques. One of my complains of new systems( both Mac
and Intel), is the waste speed. In an old 8-bit I could page flip three
images for animation, with some tricks I could get all 256 colors on
screen, and even more get to draw offscreen while moving current view(
this was helpfull for scrolling). I know it could all be "simulated" on my
Mac, but three lines of code was all I needed back then.
Well how cares I'm just an old fart, who babbles.
--
E-mail: Nolram@panix.com
Sarmiento@usa.net
Web page: http://www.panix.com/~nolram
+++++++++++++++++++++++++++
>From bwade@qualia.com (Bretton Wade)
Date: Fri, 11 Oct 1996 10:44:54 -0400
Organization: qualia, inc.
In article <53d333$5vu@nntp.hut.fi>, jmunkki@alpha.hut.fi (Juri Munkki) wrote:
# Repeat 100 times:
#
# The Macintosh is not an Amiga
#
# (This request is because I think the Amiga is one of the few "modern" machines
# where video can be placed just about anywhere in RAM.)
Yeah, and all those zip chips get expensive...
--
Bretton Wade (bwade@qualia.com)
http://www.qualia.com/~bwade/
+++++++++++++++++++++++++++
>From FranÁois Lionet <flionet@babel.asi.fr>
Date: Mon, 14 Oct 1996 12:27:20 +0100
Organization: Suprastudio
Marlon Sarmiento wrote:
> In article <53d333$5vu@nntp.hut.fi>, jmunkki@alpha.hut.fi (Juri Munkki) wrote:
> Actually many "home systems" did allow this, the 8-bit Atari's alowed
> many of flipping techniques.
Bill understood that, DirectX (on the pC you guessed) allow page
flipping.
> One of my complains of new systems( both Mac
> and Intel), is the waste speed. In an old 8-bit I could page flip three
> images for animation, with some tricks I could get all 256 colors on
> screen, and even more get to draw offscreen while moving current view(
> this was helpfull for scrolling). I know it could all be "simulated" on my
> Mac, but three lines of code was all I needed back then.
POKE POKE POKE on the Commodore 64, things were so simple then, one POKE
and you move a hardware sprite! On the other hand, the CBM64 wwas
compatible
with... the CBM 64 and not 11 years of new machines and operating
systems...
--
Francois Lionet
flionet@asi.fr
---------------------------
>From mindplay@rtd.com (Shoshana Mayden)
Subject: Word Processing DLL for Macintosh
Date: Fri, 04 Oct 96 21:28:42 GMT
Organization: Mindplay
I have been asked by one of our developers to find a Word Processing DLL that
we could use for a Macintosh program we are developing. Any ideas on where I
could find information on this? I've tried searching through the Apple
Developer pages, but haven't had any luck finding anything yet.
Any help would be appreciated. Please reply by e-mail to mindplay@rtd.com
Thanks,
Shoshana Mayden
+++++++++++++++++++++++++++
>From mpinkert@cc.gatech.edu (Mike Pinkerton)
Date: Mon, 07 Oct 1996 15:58:52 -0400
Organization: Georgia Tech
In article <53bbh4$mgd@baygull.rtd.com>, mindplay@rtd.com wrote:
>I have been asked by one of our developers to find a Word Processing DLL that
>we could use for a Macintosh program we are developing. Any ideas on where I
>could find information on this? I've tried searching through the Apple
>Developer pages, but haven't had any luck finding anything yet.
Why not just write your app as an OpenDoc container and allow the user to
use whatever word processor they want? Then they can plug in WAV or
Apple's text editor, or the Cyberdog text editor, and you don't have to
worry about writing one yourself!
For more information on OpenDoc, check out
http://www.cc.gatech.edu/people/home/mpinkert/opendoc/OpenDoc.html
--
Mike Pinkerton
mpinkert@cc.gatech.edu http://www.cc.gatech.edu/people/home/mpinkert/
Cyberdog: On the Internet, no one knows you're an OpenDoc part.
+++++++++++++++++++++++++++
>From hpe@algonet.se
Date: Tue, 08 Oct 1996 13:48:06 +0100
Organization: AlgoNet Public Access Node, Stockholm
Check PAIGE from Datapak check www.datapak.com/~datapak/ for more info.
/Peter
+++++++++++++++++++++++++++
>From Rudi Angela <rudi_angela@informaat.nl>
Date: 8 Oct 1996 08:03:59 GMT
Organization: Informaat B.V.
You can try WASTE (WorldScriptô-Aware Styled Text Engine) from marco
piovanelli (mailto:piovanel@dsi.unimi.it).
Rudi
+++++++++++++++++++++++++++
>From Joseph Strout <jstrout@ucsd.edu>
Date: Tue, 8 Oct 1996 10:39:53 -0700
Organization: University of California, San Diego
On Mon, 7 Oct 1996, Shoshana Mayden wrote:
> I have been asked by one of our developers to find a Word Processing DLL that
> we could use for a Macintosh program we are developing. Any ideas on where I
> could find information on this? I've tried searching through the Apple
> Developer pages, but haven't had any luck finding anything yet.
You probably want WASTE (http://cirrus.sprl.umich.edu:80/waste/).
What's a DLL?
,------------------------------------------------------------------.
| Joseph J. Strout Department of Neuroscience, UCSD |
| jstrout@ucsd.edu http://www-acs.ucsd.edu/~jstrout/ |
`------------------------------------------------------------------'
+++++++++++++++++++++++++++
>From dent@highway1.com.au (Andy Dent)
Date: Wed, 09 Oct 1996 12:37:46 +0800
Organization: A.D. Software
In article <mpinkert-0710961558540001@10.0.2.15>, mpinkert@cc.gatech.edu
(Mike Pinkerton) wrote:
>In article <53bbh4$mgd@baygull.rtd.com>, mindplay@rtd.com wrote:
>
>>I have been asked by one of our developers to find a Word Processing DLL that
>>we could use for a Macintosh program we are developing. Any ideas on where I
>>could find information on this? I've tried searching through the Apple
>>Developer pages, but haven't had any luck finding anything yet.
see www.datapak.com for info on Paige (often advertised in MacTech) and
I've seen references to an editing toolkit called LEdit (I think) which
was cross-platform but not (yet?) a full WP.
Datapak's stuff is good but pricey. I used their earlier engine in a
classifieds publishing system.
Andy Dent, Product Architect, A.D. Software, Western Australia
OOFILE - "the cross-platform OODBMS that speaks c++"
ftp://ftp.highway1.com.au/pub/adsoftware/oofile/
http://www.highway1.com.au/adsoftware/oofile.html
+++++++++++++++++++++++++++
>From gchapman@irus.rri.uwo.ca (Greg Chapman)
Date: Tue, 15 Oct 1996 15:21:33 -0500
Organization: Robarts Research Institute
In article <Pine.SGI.3.94.961008103919.20997E-100000@knack>, Joseph Strout
<jstrout@ucsd.edu> wrote:
> What's a DLL?
MS Windows nonsense.
--
Greg Chapman
Mac Developer - Robarts Research Institute
Imaging Research Labs
- -
"You! Out of the gene pool!"
---------------------------
>From awulf@biit.com (Andrew Wulf)
Subject: [BETA] fast memory allocator and debugging tool
Date: Sat, 12 Oct 1996 15:19:23 -0500
Organization: Biit, Inc.
Biit, Inc is looking for a few beta testers to help test HeapManager. See
description below.
To be put on the beta list, please send your contact information, and a
brief description of the application(s) you would be testing HeapManager
with, to beta@biit.com. Complex applications that create/delete large
number of objects are particularly useful. The debugging features of
HeapManager need the most exercise.
General information is available at our website <http://www.biit.com>.
HeapManager is a fast memory allocator library and heap debugging tool for
Macintosh C and C++ applications (68K/PPC) developed with Metrowerks
Codewarrior. Applications written in C++ that call operator new, and those
C applications using malloc() to allocate memory, will see performance
gains ranging from modest to dramatic (depending on how often the
application allocates/frees memory). See the website at
<http://www.biit.com> for benchmark results of testing most of the
commercially available allocators (Metrowerks, Microquill & Biit).
HeapManager also supplies a comprehensive heap checking and debugging API
to help detect memory leakage, over- and under-writes, writes to
previously freed memory, double-frees and uninitialized memory. Additional
routines collect runtime memory usage statistics such as total allocated
memory, popular allocation sizes, and others.
Use of the debugging features is made easier by the presence of HeapBoss,
an external application that can control the debugging library remotely,
display heap settings and statistics, automatically check the heap, and
record memory allocations to assist in leak detection and help track
memory usage. HeapBoss is designed to work in conjunction with the
Metrowerks Source Debugger, but can also work standalone.
To those who are familiar with Microquill's SmartHeap, HeapManager
provides similar performance, a somewhat different feature set, and also
includes an external debugging application (Microquill only ships their
HeapAgent on Windows.X platforms, and for an additional charge).
Note that HeapManager does not replace or debug the MacOS memory manager,
nor does it assist applications that only call NewPtr() or NewHandle().
HeapManager will be priced at $99 when it ships.
+++++++++++++++++++++++++++
>From unki@rzstud3.rz.uni-karlsruhe.de (Thorsten Weber)
Date: 15 Oct 1996 16:41:54 GMT
Organization: University of Karlsruhe, Germany
Andrew Wulf (awulf@biit.com) wrote:
> Biit, Inc is looking for a few beta testers to help test HeapManager. See
> description below.
[deletia]
> To those who are familiar with Microquill's SmartHeap, HeapManager
> provides similar performance, a somewhat different feature set, and also
> includes an external debugging application (Microquill only ships their
> HeapAgent on Windows.X platforms, and for an additional charge).
> Note that HeapManager does not replace or debug the MacOS memory manager,
> nor does it assist applications that only call NewPtr() or NewHandle().
> HeapManager will be priced at $99 when it ships.
Hi,
are there any plans to develop versions of HeapManager for other platforms
like Win32, Solaris..., similar to Microquill's SmartHeap ?
Just curious,
Thorsten
--
Thorsten P. Weber
eMail: unki@rz.uni-karlsruhe.de
- For free speech online and elsewhere, join the blue ribbon campaign! - ()
- ---------------- http://www.eff.org/blueribbon.html ------------------ /\
+++++++++++++++++++++++++++
>From awulf@biit.com (Andrew Wulf)
Date: Tue, 15 Oct 1996 18:20:10 -0500
Organization: Biit, Inc.
In article <540esi$52d@nz12.rz.uni-karlsruhe.de>,
unki@rzstud3.rz.uni-karlsruhe.de (Thorsten Weber) wrote:
>are there any plans to develop versions of HeapManager for other platforms
>like Win32, Solaris..., similar to Microquill's SmartHeap ?
Internally it is written to be platform-neutral. However I don't expect it
will be ported in the near future; the other platforms are *much* harder
to develop this kind of product for, and the competition is very well
entrenched. It would really depend on how much demand there will be once
HeapManager is shipping.
Focusing on making Macintosh applications faster & cleaner makes the most
sense right now.
---------------------------
>From Mark Kriegsman <kriegsman@clearway.com>
Subject: [Q] C++ static initialization in 68K code resource?
Date: Tue, 15 Oct 1996 16:15:33 -0400
Organization: ClearWay Technologies, Inc.
We're developing a (large, cool) WebSTAR plugin. The PPC version is a
shared library. The 68K version has to be a code resource. Most of our
code is C++.
So, what do we have to do to get our static initialization done in our
68K code resource? Call something explicitly? If so, what? Sez who?
(ie, where's the documentation?)
Please reply to E-MAIL TO: Ben Wyckoff <wyckoff@clearway.com>
Thanks.
-Mark
+++++++++++++++++++++++++++
>From gregj@europa.com (Greg Jorgensen)
Date: Wed, 16 Oct 1996 18:50:01 -0800
Organization: RAINet
In article <3263F0E5.3D48@clearway.com>, kriegsman@clearway.com wrote:
>We're developing a (large, cool) WebSTAR plugin. The PPC version is a
>shared library. The 68K version has to be a code resource. Most of our
>code is C++.
>
>So, what do we have to do to get our static initialization done in our
>68K code resource? Call something explicitly? If so, what? Sez who?
>(ie, where's the documentation?)
>
>Please reply to E-MAIL TO: Ben Wyckoff <wyckoff@clearway.com>
You can call the (apparently undocumented) function __InitCode__. You'll
need this in your code:
extern "C" {
extern void __InitCode__(void);
extern void __destroy_global_chain(void);
}
...
EnterCodeResource();
...
__InitCode__(); // call one time only
...
__destroy_global_chain(); // call when your code resource is disposed
I can't find any reference to this in the CW docs, but it certainly should
be somewhere. You can find the source among the various startup code
sources buried in the Mac OS Support folder.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"In a recent fire, [Bob] Dole's library burned down. Both books were lost. And he hadn't even finished coloring one." -- Jack Kemp
+++++++++++++++++++++++++++
>From tulip@tiac.net (Ed Anson)
Date: Tue, 15 Oct 1996 22:09:59 -0400
Organization: Tulip Software
In article <3263F0E5.3D48@clearway.com>, kriegsman@clearway.com wrote:
> We're developing a (large, cool) WebSTAR plugin. The PPC version is a
> shared library. The 68K version has to be a code resource. Most of our
> code is C++.
>
> So, what do we have to do to get our static initialization done in our
> 68K code resource? Call something explicitly? If so, what? Sez who?
> (ie, where's the documentation?)
>
> Please reply to E-MAIL TO: Ben Wyckoff <wyckoff@clearway.com>
The answer depends on your development environment.
I use CodeWarrior. The documentation is reasonably complete, though it's
mostly in the sample code :-)
My experience is that (once things are set up correctly) static
initialization happens automatically. Setting things up correctly mostly
involves making the correct settings in the preferences dialog.
[Unfortunately, I'm not at my development system now, so I can't specify
the details.] One of the useful options is to request the "extended" code
resource format, and there are some useful macros in SetupA4.h that you
need to use.
I hope this is enough to get you started.
- --------------------
Ed Anson
Tulip Software
Andover, MA 01810
U.S.A. <http://www.tiac.net/users/tulip/home.html>
---------------------------
>From abz@prisco.net (Alain Birtz)
Subject: [Q] telephone wire used by Phonnet
Date: 14 Oct 1996 15:10:39 GMT
Organization: Cegep St-Hyacinthe
How many and which wire are used bt Phonnet and similar product ?
Can Phonnet be used with 2 telephone line at home (one for regular
use and other the for modem) ?
Please, answer by email too.
Thank you.
--
Alain Birtz
CompuServe: 72467,2770
Internet: abz@prisco.net
+++++++++++++++++++++++++++
>From steve.w.jackson@mindspring.com (Steve W. Jackson)
Date: Mon, 14 Oct 1996 20:48:54 -0500
Organization: Montgomery, AL
In article <abz-1410961111520001@g37-95.citenet.net>, abz@prisco.net
(Alain Birtz) wrote:
;> How many and which wire are used bt Phonnet and similar product ?
;> Can Phonnet be used with 2 telephone line at home (one for regular
;> use and other the for modem) ?
;>
;> Please, answer by email too.
;>
;> Thank you.
;>
;> --
;> Alain Birtz
;> CompuServe: 72467,2770
;> Internet: abz@prisco.net
Alain, I believe this is the primary reason it's called PhoneNet. Typical
telephone wiring in homes (modern wiring, that is) has 4 wires, but your
phone only uses two. So the other two can be used for a second line or
another special purpose. Your PhoneNet connectors, if connected to the
opposite pair, should let you do what you're attempting -- with a little
tinkering and wire-studying. The wires are red, green, yellow, and
black. I'm not sure (it's been a while), but I believe that the
yellow/black pair is the first one used, and if you're in a single-line
home the red/green pair is available.
Hope this helps.
= Steve =
--
Steve W. Jackson
Montgomery, Alabama
steve.w.jackson@mindspring.com http://www.mindspring.com/~sjacksn/stevehome.html
sjackson@jgrafix.com http://www.jgrafix.com/sjackson
Do you believe in Macintosh? Learn how to help the
cause by subscribing to the "EvangeList" listserver!
Send email to <evangelist@macway.com> or check out
<http://www.solutions.apple.com/ListAdmin/>.
+++++++++++++++++++++++++++
>From geordie@chapman.com (Geordie Korper)
Date: Tue, 15 Oct 1996 11:07:45 -0500
Organization: Chapman and Cutler
In article
<steve.w.jackson-1410962048540001@user-168-121-38-201.dialup.mindspring.com>,
steve.w.jackson@mindspring.com (Steve W. Jackson) wrote:
:In article <abz-1410961111520001@g37-95.citenet.net>, abz@prisco.net
:(Alain Birtz) wrote:
:
:;> How many and which wire are used bt Phonnet and similar product ?
:;> Can Phonnet be used with 2 telephone line at home (one for regular
:;> use and other the for modem) ?
:;>
:;> Please, answer by email too.
:;>
:;> Thank you.
:;>
:;> --
:;> Alain Birtz
:;> CompuServe: 72467,2770
:;> Internet: abz@prisco.net
:
:Alain, I believe this is the primary reason it's called PhoneNet. Typical
:telephone wiring in homes (modern wiring, that is) has 4 wires, but your
:phone only uses two. So the other two can be used for a second line or
:another special purpose. Your PhoneNet connectors, if connected to the
:opposite pair, should let you do what you're attempting -- with a little
:tinkering and wire-studying. The wires are red, green, yellow, and
:black. I'm not sure (it's been a while), but I believe that the
:yellow/black pair is the first one used, and if you're in a single-line
:home the red/green pair is available.
:
:Hope this helps.
:
Just want to add to steve's excelent answer that a two line phone system
you raised the question about will not have a pair to use for phonenet.
--
Geordie Korper geordie@chapman.com
*********************************************************************
* The text above should in no way be construed to represent the *
* opinions of my employer, even if specifically stated to do so. *
*********************************************************************
+++++++++++++++++++++++++++
>From tstiller@sarnoff.com (Tom Stiller)
Date: Tue, 15 Oct 1996 07:44:30 -0400
Organization: David Sarnoff Research Center
In article <abz-1410961111520001@g37-95.citenet.net>, abz@prisco.net
(Alain Birtz) wrote:
>How many and which wire are used bt Phonnet and similar product ?
>Can Phonnet be used with 2 telephone line at home (one for regular
>use and other the for modem) ?
>
>Please, answer by email too.
>
>Thank you.
>
>--
>Alain Birtz
>CompuServe: 72467,2770
>Internet: abz@prisco.net
PhoneNet uses the outer two wires (normally yellow/black) in a standard 4
conductor phone extension. You can use the inner pair (normally
red/green) for a telephone connection. I "inject" the phone by plugging
the telephone line into the unused side of the PhoneNet connector and take
it out the same way at the other end of the link. A "proper" installation
would connect a 72 ohm resistor acrouss the outer pair on the phone line
connectors, but you may be able to get away without it; I do.
Tom Stiller
--
Everyone is entitled to my opinion
---------------------------
>From bucky43085@aol.com (Bucky43085)
Subject: beg game program-animation
Date: 10 Oct 1996 10:02:09 -0400
Organization: America Online, Inc. (1-800-827-6364)
My son is a sophomore in high school. We have a Mac PowerPC Performa.
He has taken his Texas Instruments graphing calculator and has programmed
games in it--somewhat like Nintendo type action games. He wants to do
this on the Mac and is interested in learning animation. We got Hypercard
but it does not do what he wants.
We've looked at codewarrior, C ++, and some starter kits.
What would be a good starting place, that can be upgraded as he develops
his abilities? Thanks!!!!
+++++++++++++++++++++++++++
>From yennie@aol.com (Yennie)
Date: 10 Oct 1996 15:17:06 -0400
Organization: America Online, Inc. (1-800-827-6364)
I wouldn't be so quick to abandon Hypercard. I would suggest possibly
investing in CompileIt!. It's a Hypercard based compiler that you can use
to write XCMDs and XFCNs (and actually just about any Macintosh code).
This way you can write actual Macintosh code, just as you would with C or
pascal, but it's a much easier language to learn. And you would have the
benefit of using that code in a Hypercard stack instead of trying to write
your own applications which could be a huge project. Animation is more
than a little tricky. I would suggest trying it with Hypercard alone
first. Try scripting buttons to move about the screen, etc... There are
countless Hypercard game stacks out there- search the web and dowload
some. You'll find they range from very basic to very refined.
Brian Yennie
Yennie@aol.com
<<This space for rent>>
+++++++++++++++++++++++++++
>From squires@crl.com (Scott Squires)
Date: Sun, 13 Oct 1996 16:47:04 -0800
Organization: Puffin Designs
In article <53ivl1$m9j@newsbf02.news.aol.com>,
bucky43085@aol.com (Bucky43085) wrote:
>My son is a sophomore in high school. We have a Mac PowerPC Performa.
>He has taken his Texas Instruments graphing calculator and has programmed
>games in it--somewhat like Nintendo type action games. He wants to do
>this on the Mac and is interested in learning animation. We got Hypercard
>but it does not do what he wants.
>
>We've looked at codewarrior, C ++, and some starter kits.
>What would be a good starting place, that can be upgraded as he develops
>his abilities? Thanks!!!!
Latest CodeWarrior has an in progress Game frame work called
GameWerks. He can get the student discount.
There are a few Mac Game programming books. Tricks of the Mac Gamming
Programming Gurus by McCornack, Ragnelmalm, Celestin, etc from Hayden
Books is probably the best all around one.
There are some demo games on there. Also do a check in the info-mac
and alt.sources archives. Best thing might be to get a handle on the
C language and get some example code to modify.
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
---------------------------
>From lantos@ecf.toronto.edu (David Lantos)
Subject: where can I find macsbug?
Date: Sun, 13 Oct 1996 20:36:11 GMT
Organization: University of Toronto, Engineering Computing Facility
Does anyone know where I can find a copy of Macsbug on the internet?
I've looked around with all the searching pages, and all through Apple's
site, and I can't seem to find it anywhere. Thanks a lot...
- Dave
+++++++++++++++++++++++++++
>From dtm@andrew.cmu.edu (Dave McWherter)
Date: Sun, 13 Oct 1996 17:42:12 -0400
Organization: Water Wheel Systems, Marlton, NJ
In article <Dz8EKB.Aw@ecf.toronto.edu>, lantos@ecf.toronto.edu (David
Lantos) wrote:
> Does anyone know where I can find a copy of Macsbug on the internet?
> I've looked around with all the searching pages, and all through Apple's
> site, and I can't seem to find it anywhere. Thanks a lot...
>
> - Dave
Fellow Dave, you can find MacsBug on apple's web page system. Go to
http://www.devworld.apple.com/
And click on the "FTP" link. You'll be then taken to a page which has
a bunch of links for each letter in the alphabet (give or take). Click
on the one which contains "Macsbug", and it'll take you to a page which has
a URL for Macsbug. It sounds complicated, but it's not. The version there
is 6.5.3. I don't know if it's the newest one or not, but I've had difficulty
getting it to work on my PPC....
-David McWherter
---------------------------
End of C.S.M.P. Digest
**********************